Struct holochain_types::prelude::CounterSigningSessionData
source · [−]pub struct CounterSigningSessionData { /* private fields */ }
Expand description
All the data required for a countersigning session.
Implementations
pub fn try_from_responses(
responses: Vec<PreflightResponse, Global>
) -> Result<CounterSigningSessionData, CounterSigningError>
pub fn try_from_responses(
responses: Vec<PreflightResponse, Global>
) -> Result<CounterSigningSessionData, CounterSigningError>
Attempt to build session data from a vector of responses.
pub fn agent_state_for_agent(
&self,
agent: &HoloHash<Agent>
) -> Result<&CounterSigningAgentState, CounterSigningError>
pub fn agent_state_for_agent(
&self,
agent: &HoloHash<Agent>
) -> Result<&CounterSigningAgentState, CounterSigningError>
Get the agent state for a specific agent.
pub fn build_header_set(
&self,
entry_hash: HoloHash<Entry>
) -> Result<Vec<Header, Global>, CounterSigningError>
pub fn build_header_set(
&self,
entry_hash: HoloHash<Entry>
) -> Result<Vec<Header, Global>, CounterSigningError>
Attempt to map countersigning session data to a set of headers. A given countersigning session always maps to the same ordered set of headers or an error. Note the headers are not signed as the intent is to build headers for other agents without their private keys.
pub fn try_new(
preflight_request: PreflightRequest,
responses: Vec<(CounterSigningAgentState, Signature), Global>
) -> Result<CounterSigningSessionData, CounterSigningError>
pub fn try_new(
preflight_request: PreflightRequest,
responses: Vec<(CounterSigningAgentState, Signature), Global>
) -> Result<CounterSigningSessionData, CounterSigningError>
Fallible constructor.
Combines all integrity checks.
Check that the countersigning session data responses all have the correct indexes.
Construct a Timestamp from countersigning session data. Ostensibly used for the Header because the session itself covers a time range.
Accessor to the preflight request.
Mutable preflight_request accessor for testing.
Get all the agents signing for this session.
Accessor to responses.
Trait Implementations
pub fn arbitrary(
u: &mut Unstructured<'arbitrary>
) -> Result<CounterSigningSessionData, Error>
pub fn arbitrary(
u: &mut Unstructured<'arbitrary>
) -> Result<CounterSigningSessionData, Error>
Generate an arbitrary value of Self
from the given unstructured data. Read more
pub fn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<CounterSigningSessionData, Error>
pub fn arbitrary_take_rest(
u: Unstructured<'arbitrary>
) -> Result<CounterSigningSessionData, Error>
Generate an arbitrary value of Self
from the entirety of the given unstructured data. Read more
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<CounterSigningSessionData, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<CounterSigningSessionData, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub 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
Auto Trait Implementations
impl RefUnwindSafe for CounterSigningSessionData
impl Send for CounterSigningSessionData
impl Sync for CounterSigningSessionData
impl Unpin for CounterSigningSessionData
impl UnwindSafe for CounterSigningSessionData
Blanket Implementations
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
TODO: once 1.33.0 is the minimum supported compiler version, remove Any::type_id_compat and use StdAny::type_id instead. https://github.com/rust-lang/rust/issues/27745 Read more
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more