pub struct Attribute {
pub id: Identifier,
pub commands: Vec<AttributeCommand>,
pub is_inner: bool,
pub src_ref: SrcRef,
}Expand description
An attribute item.
Fields§
§id: IdentifierThe id of the attribute.
commands: Vec<AttributeCommand>Attribute commands: width, height(30mm).
is_inner: boolTells if the attribute is an inner attribute: #[...] (outer) vs #![...] (inner).
src_ref: SrcRefSource reference
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn single_command(&self) -> Option<&AttributeCommand>
pub fn single_command(&self) -> Option<&AttributeCommand>
Return some command it is the only one in the list.
Trait Implementations§
Source§impl Eval<Option<ResolutionAttribute>> for Attribute
impl Eval<Option<ResolutionAttribute>> for Attribute
Source§fn eval(&self, context: &mut Context) -> EvalResult<Option<ResolutionAttribute>>
fn eval(&self, context: &mut Context) -> EvalResult<Option<ResolutionAttribute>>
Evaluate a syntax element into a type
T.Source§impl Eval<Vec<CustomCommand>> for Attribute
impl Eval<Vec<CustomCommand>> for Attribute
Source§fn eval(&self, context: &mut Context) -> EvalResult<Vec<CustomCommand>>
fn eval(&self, context: &mut Context) -> EvalResult<Vec<CustomCommand>>
Evaluate a syntax element into a type
T.Source§impl Eval<Vec<ExportCommand>> for Attribute
impl Eval<Vec<ExportCommand>> for Attribute
Source§fn eval(&self, context: &mut Context) -> EvalResult<Vec<ExportCommand>>
fn eval(&self, context: &mut Context) -> EvalResult<Vec<ExportCommand>>
Evaluate a syntax element into a type
T.Source§impl Eval<Vec<MeasureCommand>> for Attribute
impl Eval<Vec<MeasureCommand>> for Attribute
Source§fn eval(&self, context: &mut Context) -> EvalResult<Vec<MeasureCommand>>
fn eval(&self, context: &mut Context) -> EvalResult<Vec<MeasureCommand>>
Evaluate a syntax element into a type
T.Source§impl SrcReferrer for Attribute
impl SrcReferrer for Attribute
Source§impl TreeDisplay for Attribute
impl TreeDisplay for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl !RefUnwindSafe for Attribute
impl !Send for Attribute
impl !Sync for Attribute
impl Unpin for Attribute
impl !UnwindSafe for Attribute
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more