pub struct MutableInteractionSource { /* private fields */ }Expand description
Mutable handle to a shared interaction state.
Create one via MutableInteractionSource::new, then pass the read-only
InteractionSource to modifiers via .interaction_source(&source).
ⓘ
let src = remember(MutableInteractionSource::new);
m = m.clickable().interaction_source(&src).state_colors(...);Implementations§
Source§impl MutableInteractionSource
impl MutableInteractionSource
pub fn new() -> Self
Sourcepub fn emit(&self, interaction: Interaction)
pub fn emit(&self, interaction: Interaction)
Emit an interaction event, updating the shared state.
Sourcepub fn source(&self) -> InteractionSource
pub fn source(&self) -> InteractionSource
Get a read-only handle to the shared state.
Trait Implementations§
Source§impl Clone for MutableInteractionSource
impl Clone for MutableInteractionSource
Source§fn clone(&self) -> MutableInteractionSource
fn clone(&self) -> MutableInteractionSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MutableInteractionSource
impl Debug for MutableInteractionSource
Auto Trait Implementations§
impl !RefUnwindSafe for MutableInteractionSource
impl !Send for MutableInteractionSource
impl !Sync for MutableInteractionSource
impl !UnwindSafe for MutableInteractionSource
impl Freeze for MutableInteractionSource
impl Unpin for MutableInteractionSource
impl UnsafeUnpin for MutableInteractionSource
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