Enum macroific::attr_parse::ValueSyntax
source · pub enum ValueSyntax {
Eq,
Paren,
}
Available on crate feature
attr_parse
only.Expand description
Syntax used for providing a value
Variants§
Implementations§
source§impl ValueSyntax
impl ValueSyntax
sourcepub fn from_stream(parse: &ParseBuffer<'_>) -> Option<ValueSyntax>
pub fn from_stream(parse: &ParseBuffer<'_>) -> Option<ValueSyntax>
Peek the stream without moving the cursor and attempt to construct self based on the next token
sourcepub fn parse_token(
self,
input: &ParseBuffer<'_>
) -> Result<Option<ParseBuffer<'_>>, Error>
pub fn parse_token( self, input: &ParseBuffer<'_> ) -> Result<Option<ParseBuffer<'_>>, Error>
Parse whatever tokens need to be parsed based on the resolved syntax.
Returns a ParseBuffer
you should continue parsing if the syntax is
Paren
.
Trait Implementations§
source§impl Clone for ValueSyntax
impl Clone for ValueSyntax
source§fn clone(&self) -> ValueSyntax
fn clone(&self) -> ValueSyntax
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 ValueSyntax
impl Debug for ValueSyntax
source§impl PartialEq for ValueSyntax
impl PartialEq for ValueSyntax
source§fn eq(&self, other: &ValueSyntax) -> bool
fn eq(&self, other: &ValueSyntax) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ValueSyntax
impl Eq for ValueSyntax
impl StructuralEq for ValueSyntax
impl StructuralPartialEq for ValueSyntax
Auto Trait Implementations§
impl RefUnwindSafe for ValueSyntax
impl Send for ValueSyntax
impl Sync for ValueSyntax
impl Unpin for ValueSyntax
impl UnwindSafe for ValueSyntax
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