#[non_exhaustive]pub struct Tool {
pub id: String,
pub name: String,
pub home: Location,
pub reads: Vec<String>,
pub may_read: Vec<String>,
}Expand description
A tool that reads skills.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringA short, stable identifier.
name: StringThe name a person knows the tool by.
home: LocationThe directory whose existence shows that the tool is installed.
reads: Vec<String>Directories the tool reads in every installation. A skill in one of them reaches the tool.
may_read: Vec<String>Directories only some installations read, such as an editor integration reading more than the command line does. They never count as reaching the tool, but a copy there may still be seen twice.
Implementations§
Source§impl Tool
impl Tool
Sourcepub fn new(
id: impl Into<String>,
name: impl Into<String>,
home: Location,
) -> Self
pub fn new( id: impl Into<String>, name: impl Into<String>, home: Location, ) -> Self
A tool, installed when home exists, that reads no directory yet.
Sourcepub fn reads<I, S>(self, dirs: I) -> Self
pub fn reads<I, S>(self, dirs: I) -> Self
The same tool, reading these directories in every installation.
Trait Implementations§
impl Eq for Tool
impl StructuralPartialEq for Tool
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin for Tool
impl UnwindSafe for Tool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more