core_crypto::prelude

Struct VerifiableGroupInfo

pub struct VerifiableGroupInfo { /* private fields */ }
Expand description

A type that represents a group info of which the signature has not been verified. It implements the [Verifiable] trait and can be turned into a group info by calling verify(...) with the signature key of the Credential. When receiving a serialized group info, it can only be deserialized into a VerifiableGroupInfo, which can then be turned into a group info as described above.

Implementations§

§

impl VerifiableGroupInfo

pub fn ciphersuite(&self) -> Ciphersuite

Get (unverified) ciphersuite of the verifiable group info.

Note: This method should only be used when necessary to verify the group info signature.

pub fn group_id(&self) -> &GroupId

Get (unverified) group ID of the verifiable group info.

Note: This method should only be used when necessary to verify the group info signature.

pub async fn take_ratchet_tree( self, backend: &impl OpenMlsCryptoProvider, sender: bool, ) -> Result<RatchetTree, GroupInfoError>

Do whatever it takes not to clone the RatchetTree

Trait Implementations§

§

impl Clone for VerifiableGroupInfo

§

fn clone(&self) -> VerifiableGroupInfo

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for VerifiableGroupInfo

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deserialize for VerifiableGroupInfo

§

fn tls_deserialize<R>(bytes: &mut R) -> Result<VerifiableGroupInfo, Error>
where R: Read,

This function deserializes the bytes from the provided a std::io::Read and returns the populated struct. Read more
§

fn tls_deserialize_exact(bytes: impl AsRef<[u8]>) -> Result<Self, Error>
where Self: Sized,

This function deserializes the provided bytes and returns the populated struct. All bytes must be consumed. Read more
§

impl PartialEq for VerifiableGroupInfo

§

fn eq(&self, other: &VerifiableGroupInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Size for &VerifiableGroupInfo

§

impl Size for VerifiableGroupInfo

§

impl Verifiable for VerifiableGroupInfo

§

fn unsigned_payload(&self) -> Result<Vec<u8>, Error>

Return the unsigned, serialized payload that should be verified.
§

fn signature(&self) -> &Signature

A reference to the signature to be verified.
§

fn label(&self) -> &str

Return the string label used for labeled verification.
§

fn verify<T>( self, crypto: &impl OpenMlsCrypto, pk: &OpenMlsSignaturePublicKey, ) -> Result<T, SignatureError>
where T: VerifiedStruct<Self>,

Verifies the payload against the given credential. The signature is fetched via the [Verifiable::signature()] function and the payload via [Verifiable::unsigned_payload()]. Read more
§

fn verify_no_out( &self, crypto: &impl OpenMlsCrypto, pk: &OpenMlsSignaturePublicKey, ) -> Result<(), SignatureError>

Verifies the payload against the given credential. The signature is fetched via the [Verifiable::signature()] function and the payload via [Verifiable::unsigned_payload()]. Read more
§

impl StructuralPartialEq for VerifiableGroupInfo

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, UT> HandleAlloc<UT> for T
where T: Send + Sync,

§

fn new_handle(value: Arc<T>) -> Handle

Create a new handle for an Arc value Read more
§

unsafe fn clone_handle(handle: Handle) -> Handle

Clone a handle Read more
§

unsafe fn consume_handle(handle: Handle) -> Arc<T>

Consume a handle, getting back the initial Arc<> Read more
§

unsafe fn get_arc(handle: Handle) -> Arc<Self>

Get a clone of the Arc<> using a “borrowed” handle. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T