Type Alias masonry::text_helpers::ArcStr
source · pub type ArcStr = Arc<str>;
Expand description
A reference counted string slice.
This is a data-friendly way to represent strings in Masonry. Unlike String
it cannot be mutated, but unlike String
it can be cheaply cloned.
Aliased Type§
struct ArcStr { /* private fields */ }
Trait Implementations§
source§impl TextStorage for ArcStr
impl TextStorage for ArcStr
fn as_str(&self) -> &str
source§fn maybe_eq(&self, other: &Self) -> bool
fn maybe_eq(&self, other: &Self) -> bool
Determines quickly whether two text objects have the same content. Read more
source§fn add_attributes<'b>(
&self,
builder: RangedBuilder<'b, TextBrush, &'b str>
) -> RangedBuilder<'b, TextBrush, &'b str>
fn add_attributes<'b>( &self, builder: RangedBuilder<'b, TextBrush, &'b str> ) -> RangedBuilder<'b, TextBrush, &'b str>
If this
TextStorage
object manages style spans, it should implement
this method and update the provided builder with its spans, as required. Read more