pub struct Text<L> { /* private fields */ }Expand description
A primitive text annotation consisting of a layer, string, and location.
Implementations§
Source§impl<L> Text<L>
 
impl<L> Text<L>
pub fn new(layer: L, text: impl Into<ArcStr>) -> Self
pub fn with_transformation( layer: L, text: impl Into<ArcStr>, trans: impl Into<Transformation>, ) -> Self
pub fn layer(&self) -> &L
pub fn text(&self) -> &ArcStr
pub fn transformation(&self) -> Transformation
pub fn with_layer<L2>(&self, layer: L2) -> Text<L2>
pub fn map_layer<L2>(&self, f: impl FnOnce(&L) -> L2) -> Text<L2>
Trait Implementations§
Source§impl<'de, L> Deserialize<'de> for Text<L>where
    L: Deserialize<'de>,
 
impl<'de, L> Deserialize<'de> for Text<L>where
    L: Deserialize<'de>,
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<L> TransformMut for Text<L>
 
impl<L> TransformMut for Text<L>
Source§fn transform_mut(&mut self, trans: Transformation)
 
fn transform_mut(&mut self, trans: Transformation)
Applies matrix-vector 
Transformation trans.Source§impl<L: Clone> TransformRef for Text<L>
 
impl<L: Clone> TransformRef for Text<L>
Source§fn transform_ref(&self, trans: Transformation) -> Self
 
fn transform_ref(&self, trans: Transformation) -> Self
Applies matrix-vector 
Transformation trans.Source§impl<L> TranslateMut for Text<L>
 
impl<L> TranslateMut for Text<L>
Source§fn translate_mut(&mut self, p: Point)
 
fn translate_mut(&mut self, p: Point)
Translates the shape by a 
Point through mutation.Source§impl<L: Clone> TranslateRef for Text<L>
 
impl<L: Clone> TranslateRef for Text<L>
Source§fn translate_ref(&self, p: Point) -> Self
 
fn translate_ref(&self, p: Point) -> Self
Translates the shape by 
Point, returning a new shape.impl<L: Eq> Eq for Text<L>
impl<L> StructuralPartialEq for Text<L>
Auto Trait Implementations§
impl<L> Freeze for Text<L>where
    L: Freeze,
impl<L> RefUnwindSafe for Text<L>where
    L: RefUnwindSafe,
impl<L> Send for Text<L>where
    L: Send,
impl<L> Sync for Text<L>where
    L: Sync,
impl<L> Unpin for Text<L>where
    L: Unpin,
impl<L> UnwindSafe for Text<L>where
    L: UnwindSafe,
Blanket Implementations§
Source§impl<T> AlignRect for Twhere
    T: AlignRectMut,
 
impl<T> AlignRect for Twhere
    T: AlignRectMut,
Source§impl<T> AlignRectMut for Twhere
    T: Translate,
 
impl<T> AlignRectMut for Twhere
    T: Translate,
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to 
key and return true if they are equal.