pub struct Constant {
pub name: String,
pub type_: Type,
}
Expand description
A constant with a type.
Fields§
§name: String
The name of the constant.
type_: Type
The type of the constant.
Implementations§
Source§impl Constant
impl Constant
Sourcepub fn parse_constants(
input: TokenStream<'_>,
) -> IResult<TokenStream<'_>, Vec<Constant>, ParserError>
pub fn parse_constants( input: TokenStream<'_>, ) -> IResult<TokenStream<'_>, Vec<Constant>, ParserError>
Parse a list of constants from a token stream.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Constant
impl<'de> Deserialize<'de> for Constant
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Constant
impl Ord for Constant
Source§impl PartialOrd for Constant
impl PartialOrd for Constant
impl Eq for Constant
impl StructuralPartialEq for Constant
Auto Trait Implementations§
impl Freeze for Constant
impl RefUnwindSafe for Constant
impl Send for Constant
impl Sync for Constant
impl Unpin for Constant
impl UnwindSafe for Constant
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