Struct hdk::prelude::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>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>where
T: Into<Action> + HashableContent<HashType = Action>,
pub fn raw_from_same_hash<T>(other: SignedHashed<T>) -> SignedHashed<Action>where
T: Into<Action> + HashableContent<HashType = 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.
§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<T> PartialEq<SignedHashed<T>> for SignedHashed<T>where
T: HashableContent,
impl<T> PartialEq<SignedHashed<T>> for SignedHashed<T>where
T: HashableContent,
§fn eq(&self, other: &SignedHashed<T>) -> bool
fn eq(&self, other: &SignedHashed<T>) -> bool
§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
impl<T> Eq for SignedHashed<T>where
T: Eq + HashableContent,
impl<T> StructuralEq for SignedHashed<T>where
T: HashableContent,
Auto Trait Implementations§
impl<T> RefUnwindSafe for SignedHashed<T>where
T: RefUnwindSafe,
<T as HashableContent>::HashType: RefUnwindSafe,
impl<T> Send for SignedHashed<T>where
T: Send,
<T as HashableContent>::HashType: Send,
impl<T> Sync for SignedHashed<T>where
T: Sync,
<T as HashableContent>::HashType: Sync,
impl<T> Unpin for SignedHashed<T>where
T: Unpin,
<T as HashableContent>::HashType: Unpin,
impl<T> UnwindSafe for SignedHashed<T>where
T: UnwindSafe,
<T as HashableContent>::HashType: UnwindSafe,
Blanket Implementations§
§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.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§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
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
Compare self to
key
and return true
if they are equal.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> Pointable for T
impl<T> Pointable for T
§impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
§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