pub enum TransitableState<S, T> {
Transition(T),
Stable(S),
}Expand description
All media exchange states in which MediaStateControllable can be.
Variants§
Implementations§
Source§impl<S, T> TransitableState<S, T>
impl<S, T> TransitableState<S, T>
Sourcepub fn transition_to(self, desired_state: S) -> Self
pub fn transition_to(self, desired_state: S) -> Self
Starts transition into the desired_state changing the state to
TransitableState::Transition.
No-op if already in the desired_state.
Sourcepub fn cancel_transition(self) -> Self
pub fn cancel_transition(self) -> Self
Cancels an ongoing transition, if any.
Trait Implementations§
Source§impl<S: Clone, T: Clone> Clone for TransitableState<S, T>
impl<S: Clone, T: Clone> Clone for TransitableState<S, T>
Source§fn clone(&self) -> TransitableState<S, T>
fn clone(&self) -> TransitableState<S, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<S: Copy, T: Copy> Copy for TransitableState<S, T>
impl<S: Eq, T: Eq> Eq for TransitableState<S, T>
impl<S, T> StructuralPartialEq for TransitableState<S, T>
Auto Trait Implementations§
impl<S, T> Freeze for TransitableState<S, T>
impl<S, T> RefUnwindSafe for TransitableState<S, T>where
T: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, T> Send for TransitableState<S, T>
impl<S, T> Sync for TransitableState<S, T>
impl<S, T> Unpin for TransitableState<S, T>
impl<S, T> UnwindSafe for TransitableState<S, T>where
T: UnwindSafe,
S: UnwindSafe,
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