#[non_exhaustive]pub struct Attribute {
pub tag: String,
pub value: Value,
pub set: Option<String>,
pub position: Option<Point3>,
pub invisible: bool,
pub layer: Option<String>,
pub display: Option<AttributeDisplay>,
pub color: Option<Color>,
pub lineweight: Option<Lineweight>,
pub props: Props,
}Expand description
Non-graphic data attached to an entity (DWG ATTRIB, DGN tag, item-type property).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tag: StringTag / property name.
value: ValueValue.
set: Option<String>Owning tag set / item type / definition name.
position: Option<Point3>Where the attribute text is displayed, if it is displayed.
invisible: boolThe attribute is not displayed.
layer: Option<String>Layer of the attribute’s own record when the format stores one (a DGN tag
element has its own level). None uses the owning entity’s layer.
display: Option<AttributeDisplay>How the value text is drawn at position; None when unknown or not drawn.
color: Option<Color>Color of the attribute’s own record when the format stores one that differs from
the owning entity’s (a DGN tag element has its own symbology; the DGN reader
resolves it through the file’s color table as it does for entities). None uses
the owning entity’s color.
lineweight: Option<Lineweight>Lineweight of the attribute’s own record when the format stores one that differs
from the owning entity’s. None uses the owning entity’s lineweight.
props: PropsFormat-specific data with no neutral field (e.g. dgn.color_index, dgn.weight).
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn with_position(self, value: Point3) -> Self
pub fn with_position(self, value: Point3) -> Self
Sets Self::position to Some(value).
Sourcepub fn with_invisible(self, value: bool) -> Self
pub fn with_invisible(self, value: bool) -> Self
Sets Self::invisible.
Sourcepub fn with_layer(self, value: impl Into<String>) -> Self
pub fn with_layer(self, value: impl Into<String>) -> Self
Sets Self::layer to Some(value).
Sourcepub fn with_display(self, value: AttributeDisplay) -> Self
pub fn with_display(self, value: AttributeDisplay) -> Self
Sets Self::display to Some(value).
Sourcepub fn with_color(self, value: Color) -> Self
pub fn with_color(self, value: Color) -> Self
Sets Self::color to Some(value).
Sourcepub fn with_lineweight(self, value: Lineweight) -> Self
pub fn with_lineweight(self, value: Lineweight) -> Self
Sets Self::lineweight to Some(value).
Sourcepub fn with_props(self, value: Props) -> Self
pub fn with_props(self, value: Props) -> Self
Sets Self::props.