Enum holochain_integrity_types::entry::Entry
source · pub enum Entry {
Agent(AgentPubKey),
App(AppEntryBytes),
CounterSign(Box<CounterSigningSessionData>, AppEntryBytes),
CapClaim(CapClaimEntry),
CapGrant(CapGrantEntry),
}
Expand description
Structure holding the entry portion of a chain record.
Variants§
Agent(AgentPubKey)
The Agent
system entry, the third entry of every source chain,
which grants authoring capability for this agent.
App(AppEntryBytes)
The application entry data for entries that aren’t system created entries
CounterSign(Box<CounterSigningSessionData>, AppEntryBytes)
Application entry data for entries that need countersigning to move forward multiple chains together.
CapClaim(CapClaimEntry)
The capability claim system entry which allows committing a granted permission for later use
CapGrant(CapGrantEntry)
The capability grant system entry which allows granting of application defined capabilities
Implementations§
source§impl Entry
impl Entry
sourcepub fn as_cap_grant(&self) -> Option<CapGrant>
pub fn as_cap_grant(&self) -> Option<CapGrant>
If this entry represents a capability grant, return a CapGrant
.
sourcepub fn as_cap_claim(&self) -> Option<&CapClaim>
pub fn as_cap_claim(&self) -> Option<&CapClaim>
If this entry represents a capability claim, return a CapClaim
.
sourcepub fn as_app_entry(&self) -> Option<&AppEntryBytes>
pub fn as_app_entry(&self) -> Option<&AppEntryBytes>
If this entry represents an App entry, return AppEntryBytes
.
sourcepub fn app(sb: SerializedBytes) -> Result<Self, EntryError>
pub fn app(sb: SerializedBytes) -> Result<Self, EntryError>
Create an Entry::App from SerializedBytes
sourcepub fn app_fancy<E: Into<EntryError>, SB: TryInto<SerializedBytes, Error = SerializedBytesError>>(
sb: SB
) -> Result<Self, EntryError>
pub fn app_fancy<E: Into<EntryError>, SB: TryInto<SerializedBytes, Error = SerializedBytesError>>(
sb: SB
) -> Result<Self, EntryError>
Create an Entry::App from SerializedBytes
Trait Implementations§
source§impl<'de> Deserialize<'de> for Entry
impl<'de> Deserialize<'de> for Entry
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>,
source§impl From<HoloHashed<Entry>> for Entry
impl From<HoloHashed<Entry>> for Entry
source§fn from(entry_hashed: EntryHashed) -> Self
fn from(entry_hashed: EntryHashed) -> Self
source§impl HashableContent for Entry
impl HashableContent for Entry
source§fn hashable_content(&self) -> HashableContentBytes
fn hashable_content(&self) -> HashableContentBytes
source§impl TryFrom<&Entry> for SerializedBytes
impl TryFrom<&Entry> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(t: &Entry) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: &Entry) -> Result<SerializedBytes, SerializedBytesError>
source§impl TryFrom<Entry> for SerializedBytes
impl TryFrom<Entry> for SerializedBytes
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(t: Entry) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(t: Entry) -> Result<SerializedBytes, SerializedBytesError>
source§impl TryFrom<SerializedBytes> for Entry
impl TryFrom<SerializedBytes> for Entry
§type Error = SerializedBytesError
type Error = SerializedBytesError
source§fn try_from(sb: SerializedBytes) -> Result<Entry, SerializedBytesError>
fn try_from(sb: SerializedBytes) -> Result<Entry, SerializedBytesError>
impl Eq for Entry
impl StructuralEq for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnwindSafe for Entry
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.