File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,8 @@ pub struct Title<'a> {
162162}
163163
164164/// A source view [`Element`] in a [`Group`]
165+ ///
166+ /// If you do not have [source][Snippet::source] available, see instead [`Origin`]
165167#[ derive( Clone , Debug ) ]
166168pub struct Snippet < ' a , T > {
167169 pub ( crate ) path : Option < & ' a str > ,
@@ -375,7 +377,9 @@ impl<'a> Patch<'a> {
375377 }
376378}
377379
378- /// The location of the [`Snippet`] (e.g. a path)
380+ /// The referenced location (e.g. a path)
381+ ///
382+ /// If you have source available, see instead [`Snippet`]
379383#[ derive( Clone , Debug ) ]
380384pub struct Origin < ' a > {
381385 pub ( crate ) path : & ' a str ,
@@ -412,6 +416,12 @@ impl<'a> Origin<'a> {
412416 /// Set the default column to display
413417 ///
414418 /// Otherwise this will be inferred from the primary [`Annotation`]
419+ ///
420+ /// <div class="warning">
421+ ///
422+ /// `char_column` is only be respected if [`Origin::line`] is also set.
423+ ///
424+ /// </div>
415425 pub fn char_column ( mut self , char_column : usize ) -> Self {
416426 self . char_column = Some ( char_column) ;
417427 self
You can’t perform that action at this time.
0 commit comments