Struct holochain_types::prelude::SignedHashed
source · pub struct SignedHashed<T>where
T: HashableContent,{
pub hashed: HoloHashed<T>,
pub signature: Signature,
}
Expand description
Any content that has been hashed and signed.
Fields§
§hashed: HoloHashed<T>
The hashed content.
signature: Signature
The signature of the content.
Implementations§
source§impl<T> SignedHashed<T>
impl<T> SignedHashed<T>
sourcepub fn new_unchecked(content: T, signature: Signature) -> SignedHashed<T>
pub fn new_unchecked(content: T, signature: Signature) -> SignedHashed<T>
Create a new signed and hashed content by hashing the content, but without checking the signature.
source§impl<T> SignedHashed<T>where
T: HashableContent,
impl<T> SignedHashed<T>where
T: HashableContent,
sourcepub fn into_inner(self) -> (HoloHashed<T>, Signature)
pub fn into_inner(self) -> (HoloHashed<T>, Signature)
Destructure into a HoloHashed
and Signature
.
sourcepub fn as_hash(&self) -> &HoloHash<<T as HashableContent>::HashType>
pub fn as_hash(&self) -> &HoloHash<<T as HashableContent>::HashType>
Access the already-calculated hash stored in this wrapper type.
sourcepub fn with_presigned(
hashed: HoloHashed<T>,
signature: Signature,
) -> SignedHashed<T>
pub fn with_presigned( hashed: HoloHashed<T>, signature: Signature, ) -> SignedHashed<T>
Create with an existing signature.
source§impl SignedHashed<Action>
impl SignedHashed<Action>
sourcepub fn action_address(&self) -> &HoloHash<Action>
pub fn action_address(&self) -> &HoloHash<Action>
Access the Action Hash.
sourcepub fn raw_from_same_hash<T>(other: SignedHashed<T>) -> SignedHashed<Action>
pub fn raw_from_same_hash<T>(other: SignedHashed<T>) -> SignedHashed<Action>
Create a new SignedActionHashed from a type that implements into Action
and
has the same hash bytes.
The caller must make sure the hash does not change.
Trait Implementations§
source§impl AsRef<SignedHashed<Action>> for RegisterAgentActivity
impl AsRef<SignedHashed<Action>> for RegisterAgentActivity
source§fn as_ref(&self) -> &SignedHashed<Action>
fn as_ref(&self) -> &SignedHashed<Action>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<SignedHashed<Action>> for SignedHashed<Action>
impl AsRef<SignedHashed<Action>> for SignedHashed<Action>
source§fn as_ref(&self) -> &SignedHashed<Action>
fn as_ref(&self) -> &SignedHashed<Action>
Converts this type into a shared reference of the (usually inferred) input type.
source§impl<T> Clone for SignedHashed<T>where
T: Clone + HashableContent,
impl<T> Clone for SignedHashed<T>where
T: Clone + HashableContent,
source§fn clone(&self) -> SignedHashed<T>
fn clone(&self) -> SignedHashed<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T> Debug for SignedHashed<T>where
T: Debug + HashableContent,
impl<T> Debug for SignedHashed<T>where
T: Debug + HashableContent,
source§impl<'de, T> Deserialize<'de> for SignedHashed<T>where
T: HashableContent + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for SignedHashed<T>where
T: HashableContent + Deserialize<'de>,
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SignedHashed<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SignedHashed<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<SignedHashed<Action>> for SignedAction
impl From<SignedHashed<Action>> for SignedAction
source§fn from(shh: SignedHashed<Action>) -> SignedAction
fn from(shh: SignedHashed<Action>) -> SignedAction
Converts to this type from the input type.
source§impl<T> From<SignedHashed<T>> for HoloHashed<T>where
T: HashableContent,
impl<T> From<SignedHashed<T>> for HoloHashed<T>where
T: HashableContent,
source§fn from(sh: SignedHashed<T>) -> HoloHashed<T>
fn from(sh: SignedHashed<T>) -> HoloHashed<T>
Converts to this type from the input type.
source§impl<T> Hash for SignedHashed<T>where
T: HashableContent,
impl<T> Hash for SignedHashed<T>where
T: HashableContent,
source§impl<C, T> HashableContent for SignedHashed<C>where
C: HashableContent<HashType = T>,
T: PrimitiveHashType,
impl<C, T> HashableContent for SignedHashed<C>where
C: HashableContent<HashType = T>,
T: PrimitiveHashType,
§type HashType = <C as HashableContent>::HashType
type HashType = <C as HashableContent>::HashType
The HashType which this content will be hashed to
source§fn hash_type(&self) -> <SignedHashed<C> as HashableContent>::HashType
fn hash_type(&self) -> <SignedHashed<C> as HashableContent>::HashType
The HashType which this content will be hashed to
source§fn hashable_content(&self) -> HashableContentBytes
fn hashable_content(&self) -> HashableContentBytes
Return a subset of the content, either as SerializedBytes “content”,
which will be used to compute the hash, or as an already precomputed
hash which will be used directly
source§impl<T> PartialEq for SignedHashed<T>where
T: HashableContent,
impl<T> PartialEq for SignedHashed<T>where
T: HashableContent,
source§impl<T> Serialize for SignedHashed<T>where
T: HashableContent + Serialize,
impl<T> Serialize for SignedHashed<T>where
T: HashableContent + Serialize,
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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
source§impl TryFrom<SignedHashed<Action>> for WireDelete
impl TryFrom<SignedHashed<Action>> for WireDelete
§type Error = WrongActionError
type Error = WrongActionError
The type returned in the event of a conversion error.
source§impl TryFrom<SignedHashed<Action>> for WireNewEntryAction
impl TryFrom<SignedHashed<Action>> for WireNewEntryAction
§type Error = ActionError
type Error = ActionError
The type returned in the event of a conversion error.
source§impl TryFrom<SignedHashed<Action>> for WireUpdate
impl TryFrom<SignedHashed<Action>> for WireUpdate
§type Error = WrongActionError
type Error = WrongActionError
The type returned in the event of a conversion error.
source§impl TryFrom<SignedHashed<Action>> for WireUpdateRelationship
impl TryFrom<SignedHashed<Action>> for WireUpdateRelationship
§type Error = WrongActionError
type Error = WrongActionError
The type returned in the event of a conversion error.
impl<T> Eq for SignedHashed<T>where
T: Eq + HashableContent,
Auto Trait Implementations§
impl<T> Freeze for SignedHashed<T>
impl<T> RefUnwindSafe for SignedHashed<T>
impl<T> Send for SignedHashed<T>
impl<T> Sync for SignedHashed<T>
impl<T> Unpin for SignedHashed<T>
impl<T> UnwindSafe for SignedHashed<T>
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> CallHasher for T
impl<T> CallHasher for T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<'a, T, C> HashableContentExtAsync<'a, T> for C
impl<'a, T, C> HashableContentExtAsync<'a, T> for C
source§fn to_hash(&self) -> MustBoxFuture<'_, HoloHash<T>>
fn to_hash(&self) -> MustBoxFuture<'_, HoloHash<T>>
Construct a HoloHash from a reference
source§fn into_hashed(self) -> MustBoxFuture<'a, HoloHashed<C>>
fn into_hashed(self) -> MustBoxFuture<'a, HoloHashed<C>>
Move into a HoloHashed
source§impl<T, C> HashableContentExtSync<T> for Cwhere
T: HashTypeSync,
C: HashableContent<HashType = T>,
impl<T, C> HashableContentExtSync<T> for Cwhere
T: HashTypeSync,
C: HashableContent<HashType = T>,
source§fn into_hashed(self) -> HoloHashed<C>
fn into_hashed(self) -> HoloHashed<C>
Move into a HoloHashed
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> 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 moresource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.source§impl<T> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref