#[non_exhaustive]pub enum SceneEdit {
Change(ItemChange),
Removed {
id: ItemId,
salvage: Salvage,
},
}Expand description
One edit inside a SceneTransactionRecord, in application order.
Invert a transaction by walking edits in reverse and applying each
old; a Removed inverts to
Scene::restore.
Only a removal needs an owning variant. Every other mutator either carries
its own old in the ItemChange or hands the replaced value straight
back to its caller —
Scene::replace_item returns the box it
swapped out, so the app that called it already owns what it would need to
put back.
A Change here always satisfies
ItemChange::is_edit: the scene’s derived
notifications never reach a record. See the module header for the three
and why.
#[non_exhaustive]: this crate has out-of-tree consumers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Change(ItemChange)
Any non-removal change, verbatim from the notification channel.
Removed
A removal, with what it destroyed. Descendants come before the named
root, the order remove announces in.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SceneEdit
impl !Send for SceneEdit
impl !Sync for SceneEdit
impl !UnwindSafe for SceneEdit
impl Freeze for SceneEdit
impl Unpin for SceneEdit
impl UnsafeUnpin for SceneEdit
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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