pub enum OperationKind {
Document,
Effect,
View,
}Expand description
What an exported operation changes. Keeping this explicit prevents applications from disguising local effects or navigation as CRDT edits.
Variants§
Document
Deterministic shared-document mutation, decoded by ActionRegistry.
Effect
Local or host-owned side effect (launch, filesystem, network, media).
View
Local presentation/navigation change (selection, route, focused view).
Implementations§
Source§impl OperationKind
impl OperationKind
pub const fn as_str(self) -> &'static str
Sourcepub fn reports_a_change(self, need: ActionKind) -> bool
pub fn reports_a_change(self, need: ActionKind) -> bool
Whether a window’s report of this operation may stand as a change of the person’s history: a document or view change, or a read the input made (a press that asks and changes nothing). An effect changes nothing a history records, and the broker admits no report of one, so a window never reports an effect.
Trait Implementations§
Source§impl Clone for OperationKind
impl Clone for OperationKind
impl Copy for OperationKind
Source§impl Debug for OperationKind
impl Debug for OperationKind
Source§impl Default for OperationKind
impl Default for OperationKind
Source§impl<'de> Deserialize<'de> for OperationKind
impl<'de> Deserialize<'de> for OperationKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OperationKind
Source§impl Hash for OperationKind
impl Hash for OperationKind
Source§impl PartialEq for OperationKind
impl PartialEq for OperationKind
Source§impl Serialize for OperationKind
impl Serialize for OperationKind
impl StructuralPartialEq for OperationKind
Auto Trait Implementations§
impl Forget for OperationKind
impl Freeze for OperationKind
impl Move for OperationKind
impl RefUnwindSafe for OperationKind
impl Send for OperationKind
impl Sync for OperationKind
impl Unpin for OperationKind
impl UnsafeUnpin for OperationKind
impl UnwindSafe for OperationKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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> ⓘ
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