Skip to main content

DoForAttrs

Trait DoForAttrs 

pub trait DoForAttrs<'a, S>
where S: DoForAttrsStrategy<'a>,
{ // Required method fn do_for_attrs( &'a self, inputs: &<S as DoForAttrsStrategy<'a>>::Inputs, outputs: &mut <S as DoForAttrsStrategy<'a>>::Outputs, ) -> Result<(), <S as DoForAttrsStrategy<'a>>::Error>; }
Expand description

This trait is implemented for all blocks.

For blocks a generic implementation will call DoForAttrs::do_for_attrs for all attributes of the block variant at hand in the order they stand in the source file. Every attribute may modify the value of outputs.

For every kind of traversal the trait needs to be implemented for all attribute types. That are many but it is easier than implementing it for all occurences of an attribute in block variants separately.

Required Methods§

fn do_for_attrs( &'a self, inputs: &<S as DoForAttrsStrategy<'a>>::Inputs, outputs: &mut <S as DoForAttrsStrategy<'a>>::Outputs, ) -> Result<(), <S as DoForAttrsStrategy<'a>>::Error>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl<'a, S> DoForAttrs<'a, S> for BlockKind

§

impl<'a, S> DoForAttrs<'a, S> for CmpBlockKind

§

impl<'a, S> DoForAttrs<'a, S> for EventBlockKind

§

impl<'a, S> DoForAttrs<'a, S> for ExprBlockKind

§

impl<'a, S> DoForAttrs<'a, S> for ExprOrCmpBlockKind

§

impl<'a, S> DoForAttrs<'a, S> for ProceduresDefinition

§

impl<'a, S> DoForAttrs<'a, S> for ProceduresPrototype

§

impl<'a, S> DoForAttrs<'a, S> for StmtBlockKind