Struct yash_syntax::alias::Alias
source · [−]pub struct Alias {
pub name: String,
pub replacement: String,
pub global: bool,
pub origin: Location,
}
Expand description
Name-value pair that defines an alias.
Fields
name: String
Name of the alias that is matched against a command word by the syntax parser.
replacement: String
String that substitutes part of the source code when it is found to match the alias name.
global: bool
Whether this alias is a global alias or not.
origin: Location
Location of the word in the simple command that invoked the alias built-in to define this alias.
Trait Implementations
impl Eq for Alias
impl StructuralEq for Alias
impl StructuralPartialEq for Alias
Auto Trait Implementations
impl !RefUnwindSafe for Alias
impl !Send for Alias
impl !Sync for Alias
impl Unpin for Alias
impl !UnwindSafe for Alias
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more