Struct ComponentBehaviour
pub struct ComponentBehaviour {
pub autofocus_on_structure_change: bool,
pub appearance_reconcile: bool,
pub capture_protected: bool,
pub window: WindowRole,
}Expand description
How the window hosting a component treats its tree. Part of the component, so every host that runs it applies the same behaviour.
Fields§
§autofocus_on_structure_change: boolAfter a structural rebuild, focus the first focusable field again so a filter that rebuilds the tree keeps its caret.
appearance_reconcile: boolApply the tree’s crate::widget::Widget::appearance_intent live:
scale, theme, contrast and motion follow it each tick.
capture_protected: boolWithhold the window from screenshots, recordings, screen sharing and
remote viewers, as crate::App::set_capture_protected does: for
apps that show secrets, such as a password manager.
window: WindowRoleWhat the window is to the session: an ordinary app window, or the session’s on-screen input surface.
Implementations§
§impl ComponentBehaviour
impl ComponentBehaviour
pub const DEFAULT: ComponentBehaviour
pub const DEFAULT: ComponentBehaviour
Every behaviour off; a component spells out only what it turns on,
ComponentBehaviour { capture_protected: true, ..ComponentBehaviour::DEFAULT }.
Trait Implementations§
§impl Clone for ComponentBehaviour
impl Clone for ComponentBehaviour
§fn clone(&self) -> ComponentBehaviour
fn clone(&self) -> ComponentBehaviour
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ComponentBehaviour
impl Debug for ComponentBehaviour
§impl Default for ComponentBehaviour
impl Default for ComponentBehaviour
§fn default() -> ComponentBehaviour
fn default() -> ComponentBehaviour
§impl PartialEq for ComponentBehaviour
impl PartialEq for ComponentBehaviour
§fn eq(&self, other: &ComponentBehaviour) -> bool
fn eq(&self, other: &ComponentBehaviour) -> bool
self and other values to be equal, and is used by ==.impl Copy for ComponentBehaviour
impl Eq for ComponentBehaviour
impl StructuralPartialEq for ComponentBehaviour
Auto Trait Implementations§
impl Freeze for ComponentBehaviour
impl RefUnwindSafe for ComponentBehaviour
impl Send for ComponentBehaviour
impl Sync for ComponentBehaviour
impl Unpin for ComponentBehaviour
impl UnsafeUnpin for ComponentBehaviour
impl UnwindSafe for ComponentBehaviour
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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>
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>
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