pub struct Token { /* private fields */ }
Expand description
A token is a single unit of a command, such as a word, number or symbol. This is used to convert single characters in a more machine-readable format. For example, the string “ls -l” would be converted to a list of tokens like so: [“ls”, “-l”].
The token kind is a simple enum, which is used to distinguish between the different types of tokens. The token value is a string, which contains the actual value of the token. The token position is a simple integer, which contains the position of the token in the input string. This is used for error reporting.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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