Enum amplify_syn::LiteralClass
source · pub enum LiteralClass {
Str,
ByteStr,
Byte,
Char,
Int,
Float,
Bool,
Any,
}
Expand description
Constrains for literal value type
Variants§
Str
Literal must be a string
ByteStr
Literal must be a byte string
Byte
Literal must be a byte (in form of b'f'
)
Char
Literal must be a character
Int
Literal must be an integer
Float
Literal must be a float
Bool
Literal must be a boolean
Any
Literal must be a verbatim form
Implementations§
Trait Implementations§
source§impl Clone for LiteralClass
impl Clone for LiteralClass
source§fn clone(&self) -> LiteralClass
fn clone(&self) -> LiteralClass
Returns a copy 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 LiteralClass
impl Debug for LiteralClass
source§impl From<&Lit> for LiteralClass
impl From<&Lit> for LiteralClass
source§impl From<Lit> for LiteralClass
impl From<Lit> for LiteralClass
source§impl From<LiteralClass> for ValueClass
impl From<LiteralClass> for ValueClass
source§fn from(cls: LiteralClass) -> Self
fn from(cls: LiteralClass) -> Self
Converts to this type from the input type.
source§impl Hash for LiteralClass
impl Hash for LiteralClass
source§impl Ord for LiteralClass
impl Ord for LiteralClass
source§fn cmp(&self, other: &LiteralClass) -> Ordering
fn cmp(&self, other: &LiteralClass) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<LiteralClass> for LiteralClass
impl PartialEq<LiteralClass> for LiteralClass
source§fn eq(&self, other: &LiteralClass) -> bool
fn eq(&self, other: &LiteralClass) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<LiteralClass> for LiteralClass
impl PartialOrd<LiteralClass> for LiteralClass
source§fn partial_cmp(&self, other: &LiteralClass) -> Option<Ordering>
fn partial_cmp(&self, other: &LiteralClass) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for LiteralClass
impl Eq for LiteralClass
impl StructuralEq for LiteralClass
impl StructuralPartialEq for LiteralClass
Auto Trait Implementations§
impl RefUnwindSafe for LiteralClass
impl Send for LiteralClass
impl Sync for LiteralClass
impl Unpin for LiteralClass
impl UnwindSafe for LiteralClass
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