pub struct PlotTextAnnotation { /* private fields */ }Expand description
Caller-owned text block anchored inside a chart panel.
Implementations§
Source§impl PlotTextAnnotation
impl PlotTextAnnotation
Sourcepub fn new(corner: DataAreaCorner, text: impl Into<Text>) -> Result<Self, Error>
pub fn new(corner: DataAreaCorner, text: impl Into<Text>) -> Result<Self, Error>
Construct one validated panel-corner annotation from plain or styled text.
Local appearance replaces the complete panel-text role. Alignment applies within the text block; the selected corner continues to place that block.
Sourcepub fn at(position: TextPosition, text: impl Into<Text>) -> Result<Self, Error>
pub fn at(position: TextPosition, text: impl Into<Text>) -> Result<Self, Error>
Attach authored text to independent typed data, panel or figure references.
Sourcepub const fn position(&self) -> &TextPosition
pub const fn position(&self) -> &TextPosition
Semantic reference that owns this annotation’s placement.
Trait Implementations§
Source§impl Clone for PlotTextAnnotation
impl Clone for PlotTextAnnotation
Source§impl Debug for PlotTextAnnotation
impl Debug for PlotTextAnnotation
impl Eq for PlotTextAnnotation
Source§impl PartialEq for PlotTextAnnotation
impl PartialEq for PlotTextAnnotation
impl StructuralPartialEq for PlotTextAnnotation
Auto Trait Implementations§
impl Forget for PlotTextAnnotation
impl Freeze for PlotTextAnnotationwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<String> is !null: Freeze,
PhantomData<ArcInner<String>>: Freeze,
*const ArcInner<Vec<FontFamily>> is !null: Freeze,
PhantomData<ArcInner<Vec<FontFamily>>>: Freeze,
*const ArcInner<TextInstructions> is !null: Freeze,
PhantomData<ArcInner<TextInstructions>>: Freeze,
impl Move for PlotTextAnnotation
impl RefUnwindSafe for PlotTextAnnotation
impl Send for PlotTextAnnotation
impl Sync for PlotTextAnnotation
impl Unpin for PlotTextAnnotation
impl UnsafeUnpin for PlotTextAnnotationwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<String> is !null: UnsafeUnpin,
PhantomData<ArcInner<String>>: UnsafeUnpin,
*const ArcInner<Vec<FontFamily>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Vec<FontFamily>>>: UnsafeUnpin,
*const ArcInner<TextInstructions> is !null: UnsafeUnpin,
PhantomData<ArcInner<TextInstructions>>: UnsafeUnpin,
impl UnwindSafe for PlotTextAnnotationwhere
RawVecInner: UnwindSafe,
Arc<String>: UnwindSafe,
Arc<Vec<FontFamily>>: UnwindSafe,
Arc<TextInstructions>: UnwindSafe,
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> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.