Struct holochain::core::SignedHashed
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§
§impl<T> SignedHashed<T>
impl<T> SignedHashed<T>
pub 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.
§impl<T> SignedHashed<T>where
T: HashableContent,
impl<T> SignedHashed<T>where
T: HashableContent,
pub fn into_inner(self) -> (HoloHashed<T>, Signature)
pub fn into_inner(self) -> (HoloHashed<T>, Signature)
Destructure into a HoloHashed
and Signature
.
pub 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.
pub 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.
§impl SignedHashed<Action>
impl SignedHashed<Action>
pub fn action_address(&self) -> &HoloHash<Action>
pub fn action_address(&self) -> &HoloHash<Action>
Access the Action Hash.
pub 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§
§impl AsRef<SignedHashed<Action>> for RegisterAgentActivity
impl AsRef<SignedHashed<Action>> for RegisterAgentActivity
§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.
§impl AsRef<SignedHashed<Action>> for SignedHashed<Action>
impl AsRef<SignedHashed<Action>> for SignedHashed<Action>
§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 ChainItem for SignedHashed<Action>
impl ChainItem for SignedHashed<Action>
§impl<T> Clone for SignedHashed<T>where
T: Clone + HashableContent,
impl<T> Clone for SignedHashed<T>where
T: Clone + HashableContent,
§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 more§impl<T> Debug for SignedHashed<T>where
T: Debug + HashableContent,
impl<T> Debug for SignedHashed<T>where
T: Debug + HashableContent,
§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>,
§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
§impl From<SignedHashed<Action>> for Action
impl From<SignedHashed<Action>> for Action
§fn from(signed_action_hashed: SignedHashed<Action>) -> Action
fn from(signed_action_hashed: SignedHashed<Action>) -> Action
Converts to this type from the input type.
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.
§impl<T> From<SignedHashed<T>> for HoloHashed<T>where
T: HashableContent,
impl<T> From<SignedHashed<T>> for HoloHashed<T>where
T: HashableContent,
§fn from(sh: SignedHashed<T>) -> HoloHashed<T>
fn from(sh: SignedHashed<T>) -> HoloHashed<T>
Converts to this type from the input type.
§impl<T> Hash for SignedHashed<T>where
T: HashableContent,
impl<T> Hash for SignedHashed<T>where
T: HashableContent,
§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
§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
§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
§impl<T> PartialEq for SignedHashed<T>where
T: HashableContent,
impl<T> PartialEq for SignedHashed<T>where
T: HashableContent,
§fn eq(&self, other: &SignedHashed<T>) -> bool
fn eq(&self, other: &SignedHashed<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl<T> Serialize for SignedHashed<T>where
T: HashableContent + Serialize,
impl<T> Serialize for SignedHashed<T>where
T: HashableContent + Serialize,
§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 SignedActionHashedExt for SignedHashed<Action>
impl SignedActionHashedExt for SignedHashed<Action>
source§fn sign<'life0, 'async_trait>(
keystore: &'life0 MetaLairClient,
action_hashed: HoloHashed<Action>
) -> Pin<Box<dyn Future<Output = Result<SignedHashed<Action>, OneErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
SignedHashed<Action>: 'async_trait,
fn sign<'life0, 'async_trait>(
keystore: &'life0 MetaLairClient,
action_hashed: HoloHashed<Action>
) -> Pin<Box<dyn Future<Output = Result<SignedHashed<Action>, OneErr>> + Send + 'async_trait>>where
'life0: 'async_trait,
SignedHashed<Action>: 'async_trait,
Construct by signing the Action (NOT including the hash)
source§fn validate<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), KeystoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
SignedHashed<Action>: 'async_trait,
fn validate<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), KeystoreError>> + Send + 'async_trait>>where
'life0: 'async_trait,
SignedHashed<Action>: 'async_trait,
Validates a signed action
source§fn from_content_sync(signed_action: SignedAction) -> SignedHashed<Action>
fn from_content_sync(signed_action: SignedAction) -> SignedHashed<Action>
Create a hash from data
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§fn try_from(
shh: SignedHashed<Action>
) -> Result<WireDelete, <WireDelete as TryFrom<SignedHashed<Action>>>::Error>
fn try_from( shh: SignedHashed<Action> ) -> Result<WireDelete, <WireDelete as TryFrom<SignedHashed<Action>>>::Error>
Performs the conversion.
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§fn try_from(
shh: SignedHashed<Action>
) -> Result<WireNewEntryAction, <WireNewEntryAction as TryFrom<SignedHashed<Action>>>::Error>
fn try_from( shh: SignedHashed<Action> ) -> Result<WireNewEntryAction, <WireNewEntryAction as TryFrom<SignedHashed<Action>>>::Error>
Performs the conversion.
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§fn try_from(
shh: SignedHashed<Action>
) -> Result<WireUpdate, <WireUpdate as TryFrom<SignedHashed<Action>>>::Error>
fn try_from( shh: SignedHashed<Action> ) -> Result<WireUpdate, <WireUpdate as TryFrom<SignedHashed<Action>>>::Error>
Performs the conversion.
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.
source§fn try_from(
shh: SignedHashed<Action>
) -> Result<WireUpdateRelationship, <WireUpdateRelationship as TryFrom<SignedHashed<Action>>>::Error>
fn try_from( shh: SignedHashed<Action> ) -> Result<WireUpdateRelationship, <WireUpdateRelationship as TryFrom<SignedHashed<Action>>>::Error>
Performs the conversion.
impl<T> Eq for SignedHashed<T>where
T: Eq + HashableContent,
Auto Trait Implementations§
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§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§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
§impl<T> CallHasher for T
impl<T> CallHasher for T
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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 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> ⓘ
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§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.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.§impl<T> Upcastable for T
impl<T> Upcastable for T
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
§fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
fn upcast_any_box(self: Box<T>) -> Box<dyn Any>
upcast boxed dyn