pub trait StringAttribute: Debug + Any {
// Required methods
fn range(&self) -> TextRange;
fn copy(&self, range: TextRange) -> StringAttributeRef;
}Expand description
An abstract interface for string attributes that affects how assistive technologies, e.g. VoiceOver or TalkBack, treat the text.
Dart’s abstract base class StringAttribute, held as a StringAttributeRef. It does
not override ==: two attributes are equal only when they are the same object.
Required Methods§
Sourcefn copy(&self, range: TextRange) -> StringAttributeRef
fn copy(&self, range: TextRange) -> StringAttributeRef
Creates a new attribute with all properties copied except for range, which is updated to the specified value.
For example, the LocaleStringAttribute specifies a Locale for its
range of characters. Copying it will result in a new
LocaleStringAttribute that has the same locale but an updated
TextRange.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".