Struct cargo_rx::ExampleFileItem
source · pub struct ExampleFileItem {
pub file_path: PathBuf,
pub file_stem: String,
}Expand description
Represents an example file item
Fields§
§file_path: PathBufAbsolute file path to the example
file_stem: StringFilename of the example, excluding the file extension
Trait Implementations§
source§impl SkimItem for ExampleFileItem
impl SkimItem for ExampleFileItem
source§fn preview(&self, _context: PreviewContext<'_>) -> ItemPreview
fn preview(&self, _context: PreviewContext<'_>) -> ItemPreview
Custom preview content, default to
ItemPreview::Global which will use global preview
setting(i.e. the command set by preview option)source§fn display<'a>(&'a self, context: DisplayContext<'a>) -> AnsiString<'a>
fn display<'a>(&'a self, context: DisplayContext<'a>) -> AnsiString<'a>
The content to be displayed on the item list, could contain ANSI properties
source§fn output(&self) -> Cow<'_, str>
fn output(&self) -> Cow<'_, str>
Get output text(after accept), default to
text()
Note that this function is intended to be used by the caller of skim and will not be used by
skim. And since skim will return the item back in SkimOutput, if string is not what you
want, you could still use downcast to retain the pointer to the original struct.