Struct Property
pub struct Property { /* private fields */ }Expand description
One property of a retained PropertyList.
Implementations§
§impl Property
impl Property
pub fn new(label: impl Into<String>, value: impl Into<String>) -> Property
pub fn with_kind(self, kind: TextKind) -> Property
pub fn with_kind(self, kind: TextKind) -> Property
See PropertyRow::kind.
pub fn tone(self, tone: Tone) -> Property
pub fn tone(self, tone: Tone) -> Property
See PropertyRow::tone.
pub fn with_accessible_value(self, value: impl Into<String>) -> Property
pub fn with_accessible_value(self, value: impl Into<String>) -> Property
What assistive technology reads for the value when the painted one is not it (a masked secret, a value shown as a symbol).
pub fn action(
self,
icon: Icon,
label: impl Into<String>,
on_activate: impl FnMut() + 'static,
) -> Property
pub fn action( self, icon: Icon, label: impl Into<String>, on_activate: impl FnMut() + 'static, ) -> Property
A trailing action of your own (open a link, reveal a secret). A row holds up to two actions; extra ones are ignored.
pub fn action_binding(
self,
icon: Icon,
label: impl Into<String>,
binding: ActionBinding<()>,
) -> Property
pub fn action_binding( self, icon: Icon, label: impl Into<String>, binding: ActionBinding<()>, ) -> Property
Self::action through one of the app’s published actions: a
press, a key, assistive technology and an agent all run it, and it
shows disabled while the person may not.
Trait Implementations§
§impl From<PropertyProps> for Property
impl From<PropertyProps> for Property
§fn from(props: PropertyProps) -> Property
fn from(props: PropertyProps) -> Property
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Property
impl !RefUnwindSafe for Property
impl !Send for Property
impl !Sync for Property
impl Unpin for Property
impl UnsafeUnpin for Property
impl !UnwindSafe for Property
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more