#[non_exhaustive]pub enum ChangeSource {
User,
Programmatic,
Remote,
}Expand description
Whose change this is.
Ambient on the open transaction rather than a parameter on every mutator: widening two dozen public signatures to thread it would be a worse API and would still miss the framework’s own gesture code, which is the one caller an app cannot reach.
The framework opens ChangeSource::User transactions around exactly the
places it writes the model on the user’s behalf — the item-drag commit, the
selection-transform commit and the Alt+arrow nudge. Without that, an app
could not tell a finished drag from a programmatic move: both arrive as a
bare LocalPosChanged.
#[non_exhaustive]: this crate has out-of-tree consumers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
User
A direct user interaction — a drag, a nudge, a transform handle.
Programmatic
The app moved the scene itself: a document load, a layout pass, a data re-source, an import, an animation tick. The default, because a mutation nobody claimed is not a user’s.
Remote
Applied on behalf of a peer — collaboration, replay, a data-layer redo. A consumer re-broadcasting or recording history is expected to skip these; the framework does not interpret it.
Trait Implementations§
Source§impl Clone for ChangeSource
impl Clone for ChangeSource
Source§fn clone(&self) -> ChangeSource
fn clone(&self) -> ChangeSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ChangeSource
Source§impl Debug for ChangeSource
impl Debug for ChangeSource
Source§impl Default for ChangeSource
impl Default for ChangeSource
Source§fn default() -> ChangeSource
fn default() -> ChangeSource
impl Eq for ChangeSource
Source§impl PartialEq for ChangeSource
impl PartialEq for ChangeSource
impl StructuralPartialEq for ChangeSource
Auto Trait Implementations§
impl Freeze for ChangeSource
impl RefUnwindSafe for ChangeSource
impl Send for ChangeSource
impl Sync for ChangeSource
impl Unpin for ChangeSource
impl UnsafeUnpin for ChangeSource
impl UnwindSafe for ChangeSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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
§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<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