Struct yash_syntax::syntax::Trim
source · [−]pub struct Trim {
pub side: TrimSide,
pub length: TrimLength,
pub pattern: Word,
}
Expand description
Parameter expansion modifier that removes the beginning or end of the value being expanded.
Examples of trims include #foo
, ##bar
and %%baz*
.
A trim is composed of a side, length and pattern.
Fields
side: TrimSide
Which side of the value should be removed?
length: TrimLength
How long the pattern should match?
pattern: Word
Pattern to be matched with the expanded value.
Trait Implementations
impl Eq for Trim
impl StructuralEq for Trim
impl StructuralPartialEq for Trim
Auto Trait Implementations
impl !RefUnwindSafe for Trim
impl !Send for Trim
impl !Sync for Trim
impl Unpin for Trim
impl !UnwindSafe for Trim
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more