Struct geo_aid::script::figure::MathString
source · pub struct MathString {
pub chars: Vec<MathChar>,
pub span: Span,
}
Expand description
A series of math characters.
Fields§
§chars: Vec<MathChar>
§span: Span
Implementations§
source§impl MathString
impl MathString
pub fn new(span: Span) -> Self
sourcepub fn displayed_by_default(&self) -> Option<Self>
pub fn displayed_by_default(&self) -> Option<Self>
Panics
Any panic here is a bug.
sourcepub fn parse(content: &str, content_span: Span) -> Result<Self, Error>
pub fn parse(content: &str, content_span: Span) -> Result<Self, Error>
Errors
Returns an error on parsing errors.
pub fn is_empty(&self) -> bool
pub fn get_span(&self) -> Span
Trait Implementations§
source§impl Clone for MathString
impl Clone for MathString
source§fn clone(&self) -> MathString
fn clone(&self) -> MathString
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MathString
impl Debug for MathString
source§impl Display for MathString
impl Display for MathString
source§impl From<PointCollectionItem> for MathString
impl From<PointCollectionItem> for MathString
source§fn from(value: PointCollectionItem) -> Self
fn from(value: PointCollectionItem) -> Self
Converts to this type from the input type.
source§impl FromProperty for MathString
impl FromProperty for MathString
source§fn from_property(property: PropertyValue) -> Result<MathString, Error>
fn from_property(property: PropertyValue) -> Result<MathString, Error>
Errors Read more
source§impl FromStr for MathString
impl FromStr for MathString
Auto Trait Implementations§
impl RefUnwindSafe for MathString
impl Send for MathString
impl Sync for MathString
impl Unpin for MathString
impl UnwindSafe for MathString
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
source§impl<T> CloneWithNode for Twhere
T: Clone,
impl<T> CloneWithNode for Twhere
T: Clone,
fn clone_with_node(&mut self) -> T
fn clone_without_node(&self) -> T
source§impl<T> Convert for T
impl<T> Convert for T
source§fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
fn convert<U>(self, context: &CompileContext) -> Expr<U>where
U: ConvertFrom<T>,
Errors Read more
source§fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
fn can_convert<U>(&self) -> boolwhere
U: ConvertFrom<T>,
Errors Read more