pub enum Attribute {
Color(Color),
Resolution(ResolutionAttribute),
Size(Size2),
Export(ExportCommand),
Measure(MeasureCommand),
Custom(CustomCommand),
}Expand description
An attribute for a model.
Variants§
Color(Color)
Color attribute: color = "red"
Resolution(ResolutionAttribute)
Render resolution attribute: resolution = 200%.
Size(Size2)
Size attribute: size = std::A4.
Export(ExportCommand)
Export command: export = "test.svg".
Measure(MeasureCommand)
Measure command: measure = width
Custom(CustomCommand)
Custom non-builtin attribute with tuples: svg = (fill = “color”))
Implementations§
Trait Implementations§
Source§impl From<Attribute> for Value
This trait implementation is used to access values from an attribute.
impl From<Attribute> for Value
This trait implementation is used to access values from an attribute.
Source§impl FromIterator<Attribute> for Attributes
impl FromIterator<Attribute> for Attributes
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