Enum amplify_syn::ValueClass
source · pub enum ValueClass {
Literal(LiteralClass),
Type(TypeClass),
Expr,
}
Expand description
Constrains for attribute value type
Variants§
Literal(LiteralClass)
The value must be a literal matching given literal constraints (see
LiteralClass
)
Type(TypeClass)
The value must be of a native rust type matching given type constraints
(see TypeClass
)
Expr
The value must be of a native rust expression.
Implementations§
source§impl ValueClass
impl ValueClass
sourcepub fn str() -> ValueClass
pub fn str() -> ValueClass
Convenience constructor creating
ValueClass::Literal(LiteralClass::Str)
sourcepub fn byte_str() -> ValueClass
pub fn byte_str() -> ValueClass
Convenience constructor creating
ValueClass::Literal(LiteralClass::ByteStr)
sourcepub fn byte() -> ValueClass
pub fn byte() -> ValueClass
Convenience constructor creating
ValueClass::Literal(LiteralClass::Byte)
sourcepub fn int() -> ValueClass
pub fn int() -> ValueClass
Convenience constructor creating
ValueClass::Literal(LiteralClass::Int)
sourcepub fn float() -> ValueClass
pub fn float() -> ValueClass
Convenience constructor creating
ValueClass::Literal(LiteralClass::Float)
sourcepub fn char() -> ValueClass
pub fn char() -> ValueClass
Convenience constructor creating
ValueClass::Literal(LiteralClass::Char)
sourcepub fn bool() -> ValueClass
pub fn bool() -> ValueClass
Convenience constructor creating
ValueClass::Literal(LiteralClass::Bool)
Trait Implementations§
source§impl Clone for ValueClass
impl Clone for ValueClass
source§fn clone(&self) -> ValueClass
fn clone(&self) -> ValueClass
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ValueClass
impl Debug for ValueClass
source§impl From<&Lit> for ValueClass
impl From<&Lit> for ValueClass
source§impl From<&Type> for ValueClass
impl From<&Type> for ValueClass
source§impl From<Lit> for ValueClass
impl From<Lit> for ValueClass
source§impl From<LiteralClass> for ValueClass
impl From<LiteralClass> for ValueClass
source§fn from(cls: LiteralClass) -> Self
fn from(cls: LiteralClass) -> Self
source§impl From<Type> for ValueClass
impl From<Type> for ValueClass
source§impl From<TypeClass> for ValueClass
impl From<TypeClass> for ValueClass
source§impl Hash for ValueClass
impl Hash for ValueClass
source§impl Ord for ValueClass
impl Ord for ValueClass
source§fn cmp(&self, other: &ValueClass) -> Ordering
fn cmp(&self, other: &ValueClass) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<ValueClass> for ValueClass
impl PartialEq<ValueClass> for ValueClass
source§fn eq(&self, other: &ValueClass) -> bool
fn eq(&self, other: &ValueClass) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ValueClass> for ValueClass
impl PartialOrd<ValueClass> for ValueClass
source§fn partial_cmp(&self, other: &ValueClass) -> Option<Ordering>
fn partial_cmp(&self, other: &ValueClass) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more