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>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 duplicate 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<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<C> HasHash for SignedHashed<C>where
C: HashableContent,
impl<C> HasHash for SignedHashed<C>where
C: HashableContent,
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,
Source§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
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> 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.