pub struct SimpleAssignment<'a> {
pub name: &'a str,
pub ty: Option<Expr<'a>>,
}
Expand description
A simple assignment (i.e. a single variable with an optional type)
Fields§
§name: &'a str
The name of the variable being assigned to
ty: Option<Expr<'a>>
The type constraint on the variable, if any
Trait Implementations§
Source§impl<'a> Clone for SimpleAssignment<'a>
impl<'a> Clone for SimpleAssignment<'a>
Source§fn clone(&self) -> SimpleAssignment<'a>
fn clone(&self) -> SimpleAssignment<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SimpleAssignment<'_>
impl Debug for SimpleAssignment<'_>
Source§impl Display for SimpleAssignment<'_>
impl Display for SimpleAssignment<'_>
Source§impl<'a> PartialEq for SimpleAssignment<'a>
impl<'a> PartialEq for SimpleAssignment<'a>
impl<'a> Eq for SimpleAssignment<'a>
impl<'a> StructuralPartialEq for SimpleAssignment<'a>
Auto Trait Implementations§
impl<'a> Freeze for SimpleAssignment<'a>
impl<'a> RefUnwindSafe for SimpleAssignment<'a>
impl<'a> Send for SimpleAssignment<'a>
impl<'a> Sync for SimpleAssignment<'a>
impl<'a> Unpin for SimpleAssignment<'a>
impl<'a> UnwindSafe for SimpleAssignment<'a>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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