Expand description
A reference counted string slice.
This is a data-friendly way to represent strings in Druid. Unlike String
it cannot be mutated, but unlike String
it can be cheaply cloned.
Trait Implementations§
source§impl TextStorage for ArcStr
impl TextStorage for ArcStr
source§fn add_attributes(
&self,
builder: PietTextLayoutBuilder,
env: &Env
) -> PietTextLayoutBuilder
fn add_attributes(
&self,
builder: PietTextLayoutBuilder,
env: &Env
) -> PietTextLayoutBuilder
If this TextStorage object manages style spans, it should implement
this method and update the provided builder with its spans, as required.
source§fn env_update(&self, ctx: &EnvUpdateCtx<'_, '_>) -> bool
fn env_update(&self, ctx: &EnvUpdateCtx<'_, '_>) -> bool
This is called whenever the Env changes and should return true
if the layout should be rebuilt.
source§impl ValueType for ArcStr
impl ValueType for ArcStr
source§fn try_from_value(value: &Value) -> Result<Self, ValueTypeError>
fn try_from_value(value: &Value) -> Result<Self, ValueTypeError>
Attempt to convert the generic
Value
into this type.