pub struct ExternalSender(/* private fields */);Expand description
A RFC 9420 External Sender
This can be used to initialize a subconversation.
Implementations§
Source§impl ExternalSender
impl ExternalSender
Sourcepub fn serialize(&self) -> Vec<u8> ⓘ
pub fn serialize(&self) -> Vec<u8> ⓘ
Serialize this external sender into a byte vector.
This produces the public key and matches Self::parse_public_key.
Sourcepub fn parse_jwk(jwk: &[u8]) -> Result<ExternalSender>
pub fn parse_jwk(jwk: &[u8]) -> Result<ExternalSender>
Parse an external sender given a JWK.
This expects a raw json serialized JWK. It works with any Signature scheme.
Sourcepub fn parse_public_key(
key: &[u8],
signature_scheme: SignatureScheme,
) -> Result<ExternalSender>
pub fn parse_public_key( key: &[u8], signature_scheme: SignatureScheme, ) -> Result<ExternalSender>
Parse an external sender given a raw public key.
This supports the legacy behaviour where the server was providing the external sender public key raw.
Sourcepub fn parse(
key: &[u8],
signature_scheme: SignatureScheme,
) -> Result<ExternalSender>
pub fn parse( key: &[u8], signature_scheme: SignatureScheme, ) -> Result<ExternalSender>
Parse an external sender.
This first attempts to parse this as a JWK per parse_jwk,
and falls back to parse_public_key if the former method fails.
Methods from Deref<Target = MlsExternalSender>§
pub fn credential(&self) -> &Credential
pub fn signature_key(&self) -> &SignaturePublicKey
Trait Implementations§
Source§impl Clone for ExternalSender
impl Clone for ExternalSender
Source§fn clone(&self) -> ExternalSender
fn clone(&self) -> ExternalSender
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 Debug for ExternalSender
impl Debug for ExternalSender
Source§impl Deref for ExternalSender
impl Deref for ExternalSender
Source§impl DerefMut for ExternalSender
impl DerefMut for ExternalSender
Source§impl From<ExternalSender> for ExternalSender
impl From<ExternalSender> for ExternalSender
Source§impl From<ExternalSender> for ExternalSender
impl From<ExternalSender> for ExternalSender
Source§fn from(value: ExternalSender) -> Self
fn from(value: ExternalSender) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ExternalSender
impl PartialEq for ExternalSender
impl Eq for ExternalSender
impl StructuralPartialEq for ExternalSender
Auto Trait Implementations§
impl Freeze for ExternalSender
impl RefUnwindSafe for ExternalSender
impl Send for ExternalSender
impl Sync for ExternalSender
impl Unpin for ExternalSender
impl UnsafeUnpin for ExternalSender
impl UnwindSafe for ExternalSender
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§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