pub trait TextStyleExtension: Any + Debug {
// Required methods
fn as_any(&self) -> &(dyn Any + 'static);
fn eq_extension(&self, other: &(dyn TextStyleExtension + 'static)) -> bool;
}Expand description
A TextStyle subclass’s own part, carried by an AnyTextStyle: Dart’s class Foo extends TextStyle.
Required Methods§
Sourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
The extension as Any, for Dart’s is checks (AnyTextStyle::extension).
Sourcefn eq_extension(&self, other: &(dyn TextStyleExtension + 'static)) -> bool
fn eq_extension(&self, other: &(dyn TextStyleExtension + 'static)) -> bool
Dart’s == override on the subclass, called once the values compared equal. other
is the same runtime type when it downcasts; any other type is unequal, as Dart’s
runtimeType check makes it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".