Skip to main content

AttrObj

Type Alias AttrObj 

Source
pub type AttrObj = Box<dyn Attribute>;
Expand description

Attribute objects are boxed and stored in the IR.

Aliased Type§

pub struct AttrObj(/* private fields */);

Trait Implementations§

Source§

impl<T: Attribute> From<T> for AttrObj

Source§

fn from(value: T) -> Self

Converts to this type from the input type.
Source§

impl Parsable for AttrObj

Source§

type Arg = ()

Type of the argument that must be passed to the parser.
Source§

type Parsed = Box<dyn Attribute>

The type of the parsed entity.
Source§

fn parse<'a>( state_stream: &mut StateStream<'a>, _arg: Self::Arg, ) -> ParseResult<'a, Self::Parsed>

Define a parser using existing combinators and call into on [Parser::parse_stream] to get the final ParseResult. Use state_stream.state as necessary.
Source§

fn parser<'a>( arg: Self::Arg, ) -> Box<dyn Parser<StateStream<'a>, Output = Self::Parsed, PartialState = ()> + 'a>

Get a parser combinator that can work on StateStream as its input.
Source§

impl PartialEq for AttrObj

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Printable for AttrObj

Source§

fn fmt(&self, ctx: &Context, state: &State, f: &mut Formatter<'_>) -> Result

Source§

fn disp<'t, 'c>(&'t self, ctx: &'c Context) -> Box<dyn Display + 'c>
where 't: 'c,

Get a Display’able object from the given Context and default State.
Source§

fn print<'t, 'c>( &'t self, ctx: &'c Context, state: &State, ) -> Box<dyn Display + 'c>
where 't: 'c,

Get a Display’able object from the given Context and State.
Source§

impl Verify for AttrObj

Source§

fn verify(&self, ctx: &Context) -> Result<()>

Source§

impl Eq for AttrObj