pub struct ForwardAttrs<'a> {
pub filter: Option<&'a ForwardAttrsFilter>,
pub field: Option<&'a AttrsField>,
}
Fields§
§filter: Option<&'a ForwardAttrsFilter>
§field: Option<&'a AttrsField>
Implementations§
source§impl ForwardAttrs<'_>
impl ForwardAttrs<'_>
sourcepub fn will_forward_any(&self) -> bool
pub fn will_forward_any(&self) -> bool
Check if this will forward any attributes; this requires both that there be a filter which can match some attributes and a field to receive them.
sourcepub fn as_declaration(&self) -> Option<Declaration<'_>>
pub fn as_declaration(&self) -> Option<Declaration<'_>>
Get the field declarations to support attribute forwarding
sourcepub fn as_match_arms(&self) -> MatchArms<'_>
pub fn as_match_arms(&self) -> MatchArms<'_>
Get the match arms for attribute matching
sourcepub fn as_value_populator(&self) -> Option<ValuePopulator<'_>>
pub fn as_value_populator(&self) -> Option<ValuePopulator<'_>>
Get the statement that will try to transform forwarded attributes into the result expected by the receiver field.
sourcepub fn as_initializer(&self) -> Option<Initializer<'_>>
pub fn as_initializer(&self) -> Option<Initializer<'_>>
Get the field initializer for use when building the deriving struct.
Trait Implementations§
source§impl<'a> Default for ForwardAttrs<'a>
impl<'a> Default for ForwardAttrs<'a>
source§fn default() -> ForwardAttrs<'a>
fn default() -> ForwardAttrs<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for ForwardAttrs<'a>
impl<'a> RefUnwindSafe for ForwardAttrs<'a>
impl<'a> !Send for ForwardAttrs<'a>
impl<'a> !Sync for ForwardAttrs<'a>
impl<'a> Unpin for ForwardAttrs<'a>
impl<'a> UnwindSafe for ForwardAttrs<'a>
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