#[non_exhaustive]pub struct Block {
pub name: String,
pub id: Option<u64>,
pub base_point: Point3,
pub entities: Vec<Entity>,
pub is_xref: bool,
pub xref_path: Option<String>,
pub description: Option<String>,
pub props: Props,
}Expand description
A block definition (DGN: shared cell definition).
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.
base_point: Point3Insertion base point.
entities: Vec<Entity>Entities in block coordinates.
is_xref: boolBlock is an external reference.
xref_path: Option<String>Path of the external reference.
description: Option<String>Description text.
props: PropsFormat-specific extras.
Implementations§
Source§impl Block
impl Block
Sourcepub fn with_base_point(self, value: Point3) -> Self
pub fn with_base_point(self, value: Point3) -> Self
Sets Self::base_point.
Sourcepub fn with_entities(self, value: Vec<Entity>) -> Self
pub fn with_entities(self, value: Vec<Entity>) -> Self
Sets Self::entities.
Sourcepub fn with_is_xref(self, value: bool) -> Self
pub fn with_is_xref(self, value: bool) -> Self
Sets Self::is_xref.
Sourcepub fn with_xref_path(self, value: impl Into<String>) -> Self
pub fn with_xref_path(self, value: impl Into<String>) -> Self
Sets Self::xref_path to Some(value).
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 Block
impl<'de> Deserialize<'de> for Block
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 Block
Auto Trait Implementations§
impl Forget for Block
impl Freeze for Block
impl Move for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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