Type Alias holochain::prelude::SignedActionHashed
pub type SignedActionHashed = SignedHashed<Action>;
Expand description
The hashed action and the signature that signed it
Aliased Type§
struct SignedActionHashed {
pub hashed: HoloHashed<Action>,
pub signature: Signature,
}
Fields§
§hashed: HoloHashed<Action>
The hashed content.
signature: Signature
The signature of the content.
Implementations§
§impl<T> SignedHashed<T>where
T: HashableContent,
<T as HashableContent>::HashType: HashTypeSync,
impl<T> SignedHashed<T>where T: HashableContent, <T as HashableContent>::HashType: HashTypeSync,
pub fn new(content: T, signature: Signature) -> SignedHashed<T>
pub fn new(content: T, signature: Signature) -> SignedHashed<T>
Create a new signed and hashed content by hashing the content.
§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<'a, T> Arbitrary<'a> for SignedHashed<T>where
T: HashableContent + Arbitrary<'a>,
<T as HashableContent>::HashType: PrimitiveHashType,
impl<'a, T> Arbitrary<'a> for SignedHashed<T>where T: HashableContent + Arbitrary<'a>, <T as HashableContent>::HashType: PrimitiveHashType,
§fn arbitrary(u: &mut Unstructured<'a>) -> Result<SignedHashed<T>, Error>
fn arbitrary(u: &mut Unstructured<'a>) -> Result<SignedHashed<T>, Error>
Generate an arbitrary value of
Self
from the given unstructured data. Read more§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read more§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
source§impl From<TestChainItem> for SignedHashed<Action>
impl From<TestChainItem> for SignedHashed<Action>
source§fn from(a: TestChainItem) -> SignedHashed<Action>
fn from(a: TestChainItem) -> SignedHashed<Action>
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<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
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, Global>>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, Global>>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, Global>>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, Global>>where 'life0: 'async_trait, SignedHashed<Action>: 'async_trait,
Validates a signed action
source§fn from_content_sync(signed_action: SignedAction) -> SignedHashed<Action>where
SignedHashed<Action>: Sized,
fn from_content_sync(signed_action: SignedAction) -> SignedHashed<Action>where SignedHashed<Action>: Sized,
Create a hash from data