pub struct SheetDimension {
pub id: String,
pub kind: String,
pub alignment: String,
pub anchors: Vec<String>,
pub offset_mm: f64,
pub precision: u32,
pub tolerance: SheetTolerance,
}Expand description
One dimension drawn on the sheet.
Fields§
§id: String§kind: String§alignment: StringA linear dimension’s measured direction (ALIGNMENTS); unread by a
radial or diametral one, which measures a circle, and by an angular
one, whose direction is the two edges’.
anchors: Vec<String>The anchor references — two for a linear dimension, one for a radial or diametral one. Stored as their reference STRINGS, the convention every other reference in the document follows.
offset_mm: f64How far the dimension line sits from the anchors, paper millimetres. Signed: the sign picks the side.
precision: u32Decimals in the value.
tolerance: SheetToleranceThe tolerance block the value is written with.
Implementations§
Source§impl SheetDimension
impl SheetDimension
Sourcepub fn new(
id: String,
kind: &str,
alignment: &str,
anchors: Vec<String>,
) -> SheetDimension
pub fn new( id: String, kind: &str, alignment: &str, anchors: Vec<String>, ) -> SheetDimension
A new dimension of kind / alignment over anchors.
Sourcepub fn anchor_count(&self) -> usize
pub fn anchor_count(&self) -> usize
How many anchors this kind takes — anchor_count, which the picker
reads too.
Trait Implementations§
Source§impl Clone for SheetDimension
impl Clone for SheetDimension
Source§impl Debug for SheetDimension
impl Debug for SheetDimension
Source§impl<'de> Deserialize<'de> for SheetDimension
impl<'de> Deserialize<'de> for SheetDimension
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
Source§impl PartialEq for SheetDimension
impl PartialEq for SheetDimension
Source§impl Serialize for SheetDimension
impl Serialize for SheetDimension
impl StructuralPartialEq for SheetDimension
Auto Trait Implementations§
impl Freeze for SheetDimension
impl RefUnwindSafe for SheetDimension
impl Send for SheetDimension
impl Sync for SheetDimension
impl Unpin for SheetDimension
impl UnsafeUnpin for SheetDimension
impl UnwindSafe for SheetDimension
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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 more