pub struct Assign {
pub name: String,
pub value: Value,
pub location: Location,
}Expand description
Assignment word
Fields§
§name: StringName of the variable to assign to
In the valid assignment syntax, the name must not be empty.
value: ValueValue assigned to the variable
location: LocationLocation of the assignment word
Trait Implementations§
Source§impl FromStr for Assign
Converts a string to an assignment.
impl FromStr for Assign
Converts a string to an assignment.
Source§impl TryFrom<Word> for Assign
Fallible conversion from a word into an assignment
impl TryFrom<Word> for Assign
Fallible conversion from a word into an assignment
Source§fn try_from(word: Word) -> Result<Assign, Word>
fn try_from(word: Word) -> Result<Assign, Word>
Converts a word into an assignment.
For a successful conversion, the word must be of the form name=value,
where name is a non-empty literal word,
= is an unquoted equal sign, and value is a word. If the input word
does not match this syntax, it is returned intact in Err.
impl Eq for Assign
impl StructuralPartialEq for Assign
Auto Trait Implementations§
impl Freeze for Assign
impl !RefUnwindSafe for Assign
impl !Send for Assign
impl !Sync for Assign
impl Unpin for Assign
impl !UnwindSafe for Assign
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more