pub struct ThreadOperation {
pub version: u16,
pub thread: ContentHash,
pub parents: BTreeSet<ContentHash>,
pub publisher: [u8; 32],
pub body: ThreadOperationBody,
}Fields§
§version: u16§thread: ContentHash§parents: BTreeSet<ContentHash>§publisher: [u8; 32]Signing key of the publisher of this immutable operation. Attribution inside a source/discussion object is retained, not promoted to authority.
body: ThreadOperationBodyImplementations§
Source§impl ThreadOperation
impl ThreadOperation
pub fn hosted_execution_binding(&self) -> Result<Option<HostedExecutionBinding>>
Source§impl ThreadOperation
impl ThreadOperation
pub fn reference_proof( &self, genesis: &ThreadGenesis, ) -> Result<Option<ReferenceProof>>
pub fn facet(&self) -> ThreadFacet
Uniform source result for capture and both integration authorities. Original authored source identity. Hosted execution uses its executor proof.
pub fn source_result(&self) -> Result<Option<Capture>>
Sourcepub fn source_state(&self) -> Result<Option<State>>
pub fn source_state(&self) -> Result<Option<State>>
The exact source revision represented by a capture or hosted integration.
pub fn local_integration(&self) -> Result<Option<LocalIntegration>>
pub fn integration(&self) -> Result<Option<HostedIntegration>>
pub fn hosted_import(&self) -> Result<Option<HostedImport>>
Sourcepub fn context_revision(&self) -> Result<Option<ContextRevision>>
pub fn context_revision(&self) -> Result<Option<ContextRevision>>
A context root may be extracted atomically by a discussion resolution. Later context revisions retain that original signed resolution as parent.
pub fn encode(&self) -> Result<Vec<u8>>
pub fn id(&self) -> Result<ContentHash>
pub fn decode(bytes: &[u8]) -> Result<Self>
Sourcepub fn validate_parents(
&self,
genesis: &ThreadGenesis,
parents: &[Self],
) -> Result<()>
pub fn validate_parents( &self, genesis: &ThreadGenesis, parents: &[Self], ) -> Result<()>
Called after every parent is present. A peer cannot relabel a private dependency as public or attach an operation to a different Thread.
Trait Implementations§
Source§impl Clone for ThreadOperation
impl Clone for ThreadOperation
Source§impl Debug for ThreadOperation
impl Debug for ThreadOperation
Source§impl<'de> Deserialize<'de> for ThreadOperation
impl<'de> Deserialize<'de> for ThreadOperation
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 ThreadOperation
Source§impl PartialEq for ThreadOperation
impl PartialEq for ThreadOperation
Source§impl Serialize for ThreadOperation
impl Serialize for ThreadOperation
impl StructuralPartialEq for ThreadOperation
Auto Trait Implementations§
impl Freeze for ThreadOperation
impl RefUnwindSafe for ThreadOperation
impl Send for ThreadOperation
impl Sync for ThreadOperation
impl Unpin for ThreadOperation
impl UnsafeUnpin for ThreadOperation
impl UnwindSafe for ThreadOperation
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