pub struct Word {
pub value: String,
pub loc: Option<TokenLocation>,
}Expand description
Represents a shell word.
Fields§
§value: StringRaw text of the word.
loc: Option<TokenLocation>Location of the word
Implementations§
Source§impl Word
impl Word
Sourcepub fn with_location(s: &str, loc: &TokenLocation) -> Self
pub fn with_location(s: &str, loc: &TokenLocation) -> Self
Constructs a new Word from a given string and location.
Trait Implementations§
Source§impl SourceLocation for Word
impl SourceLocation for Word
Source§fn location(&self) -> Option<TokenLocation>
fn location(&self) -> Option<TokenLocation>
The location of the syntax item, when known
Auto Trait Implementations§
impl Freeze for Word
impl RefUnwindSafe for Word
impl Send for Word
impl Sync for Word
impl Unpin for Word
impl UnwindSafe for Word
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