Skip to main content

Attribute

Struct Attribute 

Source
pub struct Attribute {
Show 25 fields pub thickness: f64, pub location: Point, pub text_height: f64, pub value: String, pub version: Version, pub attribute_tag: String, pub flags: i32, pub field_length: i16, pub rotation: f64, pub relative_x_scale_factor: f64, pub oblique_angle: f64, pub text_style_name: String, pub text_generation_flags: i32, pub horizontal_text_justification: HorizontalTextJustification, pub vertical_text_justification: VerticalTextJustification, pub second_alignment_point: Point, pub normal: Vector, pub is_locked_in_block: bool, pub keep_duplicate_records: bool, pub m_text_flag: MTextFlag, pub is_really_locked: bool, pub alignment_point: Point, pub annotation_scale: f64, pub x_record_tag: String, pub m_text: MText, /* private fields */
}

Fields§

§thickness: f64§location: Point§text_height: f64§value: String§version: Version§attribute_tag: String§flags: i32§field_length: i16§rotation: f64§relative_x_scale_factor: f64§oblique_angle: f64§text_style_name: String§text_generation_flags: i32§horizontal_text_justification: HorizontalTextJustification§vertical_text_justification: VerticalTextJustification§second_alignment_point: Point§normal: Vector§is_locked_in_block: bool§keep_duplicate_records: bool§m_text_flag: MTextFlag§is_really_locked: bool§alignment_point: Point§annotation_scale: f64§x_record_tag: String§m_text: MText

Implementations§

Source§

impl Attribute

Source

pub fn is_invisible(&self) -> bool

Source

pub fn set_is_invisible(&mut self, val: bool)

Source

pub fn is_constant(&self) -> bool

Source

pub fn set_is_constant(&mut self, val: bool)

Source

pub fn is_input_verification_required(&self) -> bool

Source

pub fn set_is_input_verification_required(&mut self, val: bool)

Source

pub fn is_attribute_present(&self) -> bool

Source

pub fn set_is_attribute_present(&mut self, val: bool)

Source

pub fn is_text_backwards(&self) -> bool

Source

pub fn set_is_text_backwards(&mut self, val: bool)

Source

pub fn is_text_upside_down(&self) -> bool

Source

pub fn set_is_text_upside_down(&mut self, val: bool)

Source

pub fn secondary_attributes<'a>( &self, drawing: &'a Drawing, ) -> Vec<DrawingItem<'a>>

Source

pub fn add_secondary_attributes(&mut self, item: &DrawingItemMut<'_>)

Trait Implementations§

Source§

impl Clone for Attribute

Source§

fn clone(&self) -> Attribute

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Attribute

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Attribute

Source§

fn default() -> Attribute

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Attribute

Source§

fn eq(&self, other: &Attribute) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Attribute

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.