Struct yash_syntax::syntax::Assign
source · [−]Expand description
Assignment word.
Fields
name: String
Name of the variable to assign to.
In the valid assignment syntax, the name must not be empty.
value: Value
Value assigned to the variable.
location: Location
Location of the assignment word.
Trait Implementations
sourceimpl TryFrom<Word> for Assign
impl TryFrom<Word> for Assign
Fallible conversion from a word into an assignment.
sourcefn 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 StructuralEq for Assign
impl StructuralPartialEq for Assign
Auto Trait Implementations
impl !RefUnwindSafe for Assign
impl !Send for Assign
impl !Sync for Assign
impl Unpin for Assign
impl !UnwindSafe for Assign
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more