pub enum Op {
StoreElement {
element: Element,
},
StoreEntry {
header: SignedHashed<EntryCreationHeader>,
entry: Entry,
},
RegisterUpdate {
update: SignedHashed<Update>,
new_entry: Entry,
original_header: EntryCreationHeader,
original_entry: Entry,
},
RegisterDelete {
delete: SignedHashed<Delete>,
original_header: EntryCreationHeader,
original_entry: Entry,
},
RegisterAgentActivity {
header: SignedHashed<Header>,
},
RegisterCreateLink {
create_link: SignedHashed<CreateLink>,
base: Entry,
target: Entry,
},
RegisterDeleteLink {
delete_link: SignedHashed<DeleteLink>,
create_link: CreateLink,
},
}
Expand description
The operational transforms that can are applied to Holochain data.
Operations beginning with Store
are concerned with creating and
storing data.
Operations beginning with Register
are concerned with registering
metadata about the data.
Variants
StoreElement
Stores a new Element
in the DHT.
This is the act of creating a new Header
and publishing it to the DHT.
Note that not all Header
s contain an Entry
.
StoreEntry
Fields
header: SignedHashed<EntryCreationHeader>
The signed and hashed EntryCreationHeader
that creates
a new instance of the Entry
.
Stores a new Entry
in the DHT.
This is the act of creating a either a Header::Create
or
a Header::Update
and publishing it to the DHT.
These headers create a new instance of an Entry
.
RegisterUpdate
Fields
update: SignedHashed<Update>
The signed and hashed Header::Update
that registers the update.
original_header: EntryCreationHeader
The original EntryCreationHeader
that created
the original Entry
.
Note that the update points to a specific instance of the
of the original Entry
.
Registers an update from an instance of an Entry
in the DHT.
This is the act of creating a Header::Update
and
publishing it to the DHT.
Note that the Header::Update
stores an new instance
of an Entry
and registers it as an update to the original Entry
.
This operation is only concerned with registering the update.
RegisterDelete
Fields
delete: SignedHashed<Delete>
The signed and hashed Header::Delete
that registers the deletion.
original_header: EntryCreationHeader
The original EntryCreationHeader
that created
the original Entry
.
Registers a deletion of an instance of an Entry
in the DHT.
This is the act of creating a Header::Delete
and
publishing it to the DHT.
RegisterAgentActivity
Fields
header: SignedHashed<Header>
The signed and hashed Header
that is being registered.
Registers a new Header
on an agent source chain.
This is the act of creating any Header
and
publishing it to the DHT.
RegisterCreateLink
Fields
create_link: SignedHashed<CreateLink>
The signed and hashed Header::CreateLink
that registers the link.
Registers a link between two Entry
s.
This is the act of creating a Header::CreateLink
and
publishing it to the DHT.
The authority is the entry authority for the base Entry
.
RegisterDeleteLink
Fields
delete_link: SignedHashed<DeleteLink>
The signed and hashed Header::DeleteLink
that registers the deletion.
create_link: CreateLink
The link that is being deleted.
Deletes a link between two Entry
s.
This is the act of creating a Header::DeleteLink
and
publishing it to the DHT.
The delete always references a specific Header::CreateLink
.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Op
impl<'de> Deserialize<'de> for Op
sourcepub fn deserialize<__D>(
__deserializer: __D
) -> Result<Op, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Op, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for Op
impl Serialize for Op
sourcepub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
sourceimpl<'_> TryFrom<&'_ Op> for SerializedBytes
impl<'_> TryFrom<&'_ Op> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcepub fn try_from(t: &Op) -> Result<SerializedBytes, SerializedBytesError>
pub fn try_from(t: &Op) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<Op> for SerializedBytes
impl TryFrom<Op> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcepub fn try_from(t: Op) -> Result<SerializedBytes, SerializedBytesError>
pub fn try_from(t: Op) -> Result<SerializedBytes, SerializedBytesError>
Performs the conversion.
sourceimpl TryFrom<SerializedBytes> for Op
impl TryFrom<SerializedBytes> for Op
type Error = SerializedBytesError
type Error = SerializedBytesError
The type returned in the event of a conversion error.
sourcepub fn try_from(sb: SerializedBytes) -> Result<Op, SerializedBytesError>
pub fn try_from(sb: SerializedBytes) -> Result<Op, SerializedBytesError>
Performs the conversion.
impl StructuralPartialEq for Op
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more