#[non_exhaustive]pub struct Layer {
pub name: String,
pub id: Option<u64>,
pub color: Color,
pub linetype: Option<String>,
pub lineweight: Lineweight,
pub visible: bool,
pub frozen: bool,
pub locked: bool,
pub plottable: bool,
pub description: Option<String>,
pub props: Props,
}Expand description
A layer (DGN: level).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringUnique name.
id: Option<u64>Native identifier (DWG handle, DGN level id).
color: ColorDefault color of entities on this layer.
linetype: Option<String>Default linetype name.
lineweight: LineweightDefault lineweight.
visible: boolLayer is on / displayed.
frozen: boolLayer is frozen.
locked: boolLayer is locked.
plottable: boolLayer is plotted.
description: Option<String>Free-text description.
props: PropsFormat-specific extras.
Implementations§
Source§impl Layer
impl Layer
Sourcepub fn with_name(self, value: impl Into<String>) -> Self
pub fn with_name(self, value: impl Into<String>) -> Self
Sets Self::name.
Sourcepub fn with_color(self, value: Color) -> Self
pub fn with_color(self, value: Color) -> Self
Sets Self::color.
Sourcepub fn with_linetype(self, value: impl Into<String>) -> Self
pub fn with_linetype(self, value: impl Into<String>) -> Self
Sets Self::linetype to Some(value).
Sourcepub fn with_lineweight(self, value: Lineweight) -> Self
pub fn with_lineweight(self, value: Lineweight) -> Self
Sets Self::lineweight.
Sourcepub fn with_visible(self, value: bool) -> Self
pub fn with_visible(self, value: bool) -> Self
Sets Self::visible.
Sourcepub fn with_frozen(self, value: bool) -> Self
pub fn with_frozen(self, value: bool) -> Self
Sets Self::frozen.
Sourcepub fn with_locked(self, value: bool) -> Self
pub fn with_locked(self, value: bool) -> Self
Sets Self::locked.
Sourcepub fn with_plottable(self, value: bool) -> Self
pub fn with_plottable(self, value: bool) -> Self
Sets Self::plottable.
Sourcepub fn with_description(self, value: impl Into<String>) -> Self
pub fn with_description(self, value: impl Into<String>) -> Self
Sets Self::description to Some(value).
Sourcepub fn with_props(self, value: Props) -> Self
pub fn with_props(self, value: Props) -> Self
Sets Self::props.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Layer
impl<'de> Deserialize<'de> for Layer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Layer
Auto Trait Implementations§
impl Forget for Layer
impl Freeze for Layer
impl Move for Layer
impl RefUnwindSafe for Layer
impl Send for Layer
impl Sync for Layer
impl Unpin for Layer
impl UnsafeUnpin for Layer
impl UnwindSafe for Layer
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