pub struct MutationOutcome {
pub mutated: Option<DynSubscription>,
pub mutations: Vec<Mutation>,
}Expand description
The result of applying a Mutation to a DynSubscription
Fields§
§mutated: Option<DynSubscription>Optional new mutated subscription state
mutations: Vec<Mutation>Mutations applied to the DynSubscription
Implementations§
Source§impl MutationOutcome
impl MutationOutcome
pub fn new() -> Self
pub fn with_mutations(mutations: Vec<Mutation>) -> Self
pub fn with_mutated(mutated: DynSubscription, mutations: Vec<Mutation>) -> Self
Sourcepub fn apply_to(self, target: &mut DynSubscription) -> Self
pub fn apply_to(self, target: &mut DynSubscription) -> Self
Updates target to the mutated state if any, otherwise leave target as is.
pub fn has_new_state(&self) -> bool
pub fn has_changes(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MutationOutcome
impl !RefUnwindSafe for MutationOutcome
impl Send for MutationOutcome
impl Sync for MutationOutcome
impl Unpin for MutationOutcome
impl !UnwindSafe for MutationOutcome
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
impl<S> CastArc for Swhere
S: CastFromSync + ?Sized,
Source§impl<T> CastFrom for Twhere
T: Any + 'static,
impl<T> CastFrom for Twhere
T: Any + 'static,
Source§fn ref_any(&self) -> &(dyn Any + 'static)
fn ref_any(&self) -> &(dyn Any + 'static)
Returns a immutable reference to
Any, which is backed by the type implementing this trait.Source§fn mut_any(&mut self) -> &mut (dyn Any + 'static)
fn mut_any(&mut self) -> &mut (dyn Any + 'static)
Returns a mutable reference to
Any, which is backed by the type implementing this trait.Source§impl<T> CastFromSync for T
impl<T> CastFromSync for T
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