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
impl VerifiableGroupInfo
pub fn ciphersuite(&self) -> Ciphersuite
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
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>
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
impl Clone for VerifiableGroupInfo
§fn clone(&self) -> VerifiableGroupInfo
fn clone(&self) -> VerifiableGroupInfo
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 Debug for VerifiableGroupInfo
impl Debug for VerifiableGroupInfo
§impl Deserialize for VerifiableGroupInfo
impl Deserialize for VerifiableGroupInfo
§fn tls_deserialize<R>(bytes: &mut R) -> Result<VerifiableGroupInfo, Error>where
R: Read,
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§impl PartialEq for VerifiableGroupInfo
impl PartialEq for VerifiableGroupInfo
§impl Size for &VerifiableGroupInfo
impl Size for &VerifiableGroupInfo
fn tls_serialized_len(&self) -> usize
§impl Size for VerifiableGroupInfo
impl Size for VerifiableGroupInfo
fn tls_serialized_len(&self) -> usize
§impl Verifiable for VerifiableGroupInfo
impl Verifiable for VerifiableGroupInfo
§fn unsigned_payload(&self) -> Result<Vec<u8>, Error>
fn unsigned_payload(&self) -> Result<Vec<u8>, Error>
Return the unsigned, serialized payload that should be verified.
§fn verify<T>(
self,
crypto: &impl OpenMlsCrypto,
pk: &OpenMlsSignaturePublicKey,
) -> Result<T, SignatureError>where
T: VerifiedStruct<Self>,
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>
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 moreimpl StructuralPartialEq for VerifiableGroupInfo
Auto Trait Implementations§
impl Freeze for VerifiableGroupInfo
impl RefUnwindSafe for VerifiableGroupInfo
impl Send for VerifiableGroupInfo
impl Sync for VerifiableGroupInfo
impl Unpin for VerifiableGroupInfo
impl UnwindSafe for VerifiableGroupInfo
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
Read moresource§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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