[][src]Struct ron_crdt::op::Op

pub struct Op {
    pub ty: UUID,
    pub object: UUID,
    pub event: UUID,
    pub location: UUID,
    pub atoms: SmallVec<[Atom; 3]>,
    pub term: Terminator,
}

An Op (operation) in RON describes part of the initial state of an object, or a specific action on an object, or some other part related to the Swarm protocol (such as a query or handshake).

Every op consists of four UUIDs (type, object, event and re), a (possibly empty) sequence of atoms, and a terminator.

Fields

ty: UUID

Op type.

object: UUID

Object this Op modifies.

event: UUID

Event timestamp

location: UUID

Location/field inside the object.

atoms: SmallVec<[Atom; 3]>

Op payload.

term: Terminator

Op terminator.

Methods

impl Op[src]

pub fn parse_inplace<'a>(
    prev: &mut Option<Op>,
    input: &'a str
) -> Option<&'a str>
[src]

Parse a single Op from string input into prev. If prev is not None the Op may be compressed against prev.

pub fn compress(&self, context: Option<&Op>) -> String[src]

Serialize Op to text optionally compressing it against context.

Trait Implementations

impl Clone for Op[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq<Op> for Op[src]

impl Debug for Op[src]

impl Display for Op[src]

Auto Trait Implementations

impl Send for Op

impl Sync for Op

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]