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> {
162
162
}
163
163
164
164
/// A source view [`Element`] in a [`Group`]
165
+ ///
166
+ /// If you do not have [source][Snippet::source] available, see instead [`Origin`]
165
167
#[ derive( Clone , Debug ) ]
166
168
pub struct Snippet < ' a , T > {
167
169
pub ( crate ) path : Option < & ' a str > ,
@@ -375,7 +377,9 @@ impl<'a> Patch<'a> {
375
377
}
376
378
}
377
379
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`]
379
383
#[ derive( Clone , Debug ) ]
380
384
pub struct Origin < ' a > {
381
385
pub ( crate ) path : & ' a str ,
@@ -412,6 +416,12 @@ impl<'a> Origin<'a> {
412
416
/// Set the default column to display
413
417
///
414
418
/// 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>
415
425
pub fn char_column ( mut self , char_column : usize ) -> Self {
416
426
self . char_column = Some ( char_column) ;
417
427
self
You can’t perform that action at this time.
0 commit comments