Skip to main content

TextDiagramObject

Struct TextDiagramObject 

Source
pub struct TextDiagramObject<'a>(pub &'a Object);
Expand description

A diagram object for placing free-text or text derived from an associated domain object.

Tuple Fields§

§0: &'a Object

Implementations§

Source§

impl<'a> TextDiagramObject<'a>

Source

pub fn mrid(&self) -> &'a Mrid

The object’s master resource identifier.

Source

pub fn diagram_objects( &self, ) -> impl Iterator<Item = TypedRef<DiagramObject<'static>>> + use<'a>

The diagram objects that are associated with the domain object.

Source

pub fn diagram_objects_in<'d>( &self, dataset: &'d Dataset, ) -> impl Iterator<Item = DiagramObject<'d>> + use<'a, 'd>

Resolve every DiagramObjects through dataset, skipping unresolved references.

Source

pub fn description(&self) -> Option<&'a str>

The description is a free human readable text describing or naming the object. It may be non unique and may not correlate to a naming hierarchy.

Source

pub fn m_rid(&self) -> Option<&'a str>

Master resource identifier issued by a model authority. The mRID is unique within an exchange context. Global uniqueness is easily achieved by using a UUID, as specified in RFC 4122, for the mRID. The use of UUID is strongly recommended. For CIMXML data files in RDF syntax conforming to IEC 61970-552, the mRID is mapped to rdf:ID or rdf:about attributes that identify CIM object elements.

Source

pub fn name(&self) -> Option<&'a str>

The name is any free human readable and possibly non unique text naming the object.

Source

pub fn energy_ident_code_eic(&self) -> Option<&'a str>

The attribute is used for an exchange of the EIC code (Energy identification Code). The length of the string is 16 characters as defined by the EIC code. For details on EIC scheme please refer to ENTSO-E web site.

Source

pub fn short_name(&self) -> Option<&'a str>

The attribute is used for an exchange of a human readable short name with length of the string 12 characters maximum.

Source

pub fn diagram(&self) -> Option<TypedRef<Diagram<'static>>>

A diagram object is part of a diagram.

Source

pub fn diagram_in<'d>(&self, dataset: &'d Dataset) -> Option<Diagram<'d>>

Resolve Diagram through dataset.

Source

pub fn diagram_object_points( &self, ) -> impl Iterator<Item = TypedRef<DiagramObjectPoint<'static>>> + use<'a>

A diagram object can have 0 or more points to reflect its layout position, routing (for polylines) or boundary (for polygons).

Source

pub fn diagram_object_points_in<'d>( &self, dataset: &'d Dataset, ) -> impl Iterator<Item = DiagramObjectPoint<'d>> + use<'a, 'd>

Resolve every DiagramObjectPoints through dataset, skipping unresolved references.

Source

pub fn diagram_object_style( &self, ) -> Option<TypedRef<DiagramObjectStyle<'static>>>

A diagram object has a style associated that provides a reference for the style used in the originating system.

Source

pub fn diagram_object_style_in<'d>( &self, dataset: &'d Dataset, ) -> Option<DiagramObjectStyle<'d>>

Resolve DiagramObjectStyle through dataset.

Source

pub fn identified_object(&self) -> Option<TypedRef<IdentifiedObject<'static>>>

The domain object to which this diagram object is associated.

Source

pub fn identified_object_in<'d>( &self, dataset: &'d Dataset, ) -> Option<IdentifiedObject<'d>>

Resolve IdentifiedObject through dataset.

Source

pub fn visibility_layers( &self, ) -> impl Iterator<Item = TypedRef<VisibilityLayer<'static>>> + use<'a>

A diagram object can be part of multiple visibility layers.

Source

pub fn visibility_layers_in<'d>( &self, dataset: &'d Dataset, ) -> impl Iterator<Item = VisibilityLayer<'d>> + use<'a, 'd>

Resolve every VisibilityLayers through dataset, skipping unresolved references.

Source

pub fn drawing_order(&self) -> Option<i64>

The drawing order of this element. The higher the number, the later the element is drawn in sequence. This is used to ensure that elements that overlap are rendered in the correct order.

Source

pub fn is_polygon(&self) -> Option<bool>

Defines whether or not the diagram objects points define the boundaries of a polygon or the routing of a polyline. If this value is true then a receiving application should consider the first and last points to be connected.

Source

pub fn offset_x(&self) -> Option<f64>

The offset in the X direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon).

The offset is in per-unit with 0 indicating there is no offset from the horizontal centre of the icon. -0.5 indicates it is offset by 50% to the left and 0.5 indicates an offset of 50% to the right.

Source

pub fn offset_y(&self) -> Option<f64>

The offset in the Y direction. This is used for defining the offset from centre for rendering an icon (the default is that a single point specifies the centre of the icon).

The offset is in per-unit with 0 indicating there is no offset from the vertical centre of the icon. The offset direction is dependent on the orientation of the diagram, with -0.5 and 0.5 indicating an offset of +/- 50% on the vertical axis.

Source

pub fn rotation(&self) -> Option<f64>

Sets the angle of rotation of the diagram object. Zero degrees is pointing to the top of the diagram. Rotation is clockwise. DiagramObject.rotation=0 has the following meaning: The connection point of an element which has one terminal is pointing to the top side of the diagram. The connection point “From side” of an element which has more than one terminal is pointing to the top side of the diagram. DiagramObject.rotation=90 has the following meaning: The connection point of an element which has one terminal is pointing to the right hand side of the diagram. The connection point “From side” of an element which has more than one terminal is pointing to the right hand side of the diagram.

Unit: deg.

Source

pub fn text(&self) -> Option<&'a str>

The text that is displayed by this text diagram object.

Trait Implementations§

Source§

impl<'a> Clone for TextDiagramObject<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for TextDiagramObject<'a>

Source§

impl<'a> Debug for TextDiagramObject<'a>

Source§

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

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

impl<'a> TypedView<'a> for TextDiagramObject<'a>

Source§

const CLASS: ClassId = classes::TextDiagramObject

The class this view represents.
Source§

fn from_object(o: &'a Object) -> Self

Wrap an object without checking its class.
Source§

fn object(&self) -> &'a Object

The underlying object.
Source§

fn try_from_object(schema: &Schema, object: &'a Object) -> Option<Self>

Wrap an object only if its class matches, including subclasses.
Source§

fn mrid(&self) -> &'a Mrid

The object’s master resource identifier.

Auto Trait Implementations§

§

impl<'a> Forget for TextDiagramObject<'a>

§

impl<'a> Freeze for TextDiagramObject<'a>

§

impl<'a> Move for TextDiagramObject<'a>

§

impl<'a> RefUnwindSafe for TextDiagramObject<'a>

§

impl<'a> Send for TextDiagramObject<'a>

§

impl<'a> Sync for TextDiagramObject<'a>

§

impl<'a> Unpin for TextDiagramObject<'a>

§

impl<'a> UnsafeUnpin for TextDiagramObject<'a>

§

impl<'a> UnwindSafe for TextDiagramObject<'a>

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.