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§
impl Eq for Assign
Source§impl FromStr for Assign
Converts a string to an assignment.
impl FromStr for Assign
Converts a string to an assignment.
impl StructuralPartialEq for Assign
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.
Auto Trait Implementations§
impl !RefUnwindSafe for Assign
impl !Send for Assign
impl !Sync for Assign
impl !UnwindSafe for Assign
impl Freeze for Assign
impl Unpin for Assign
impl UnsafeUnpin 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