pub struct ClientSecret(/* private fields */);Expand description
A client secret.
Client secrets in Matrix are opaque character sequences of [0-9a-zA-Z.=_-]. Their length must
must not exceed 255 characters.
You can create one from a string (using ClientSecret::parse()) but the recommended way is to
use ClientSecret::new() to generate a random one. If that function is not available for you,
you need to activate this crate’s rand Cargo feature.
Implementations§
Source§impl ClientSecret
impl ClientSecret
Source§impl ClientSecret
impl ClientSecret
Source§impl ClientSecret
impl ClientSecret
Sourcepub fn new() -> OwnedClientSecret
Available on crate features events and rand only.
pub fn new() -> OwnedClientSecret
events and rand only.Creates a random client secret.
This will currently be a UUID without hyphens, but no guarantees are made about the structure of client secrets generated from this function.
Trait Implementations§
Source§impl AsRef<[u8]> for ClientSecret
impl AsRef<[u8]> for ClientSecret
Source§impl AsRef<ClientSecret> for ClientSecret
impl AsRef<ClientSecret> for ClientSecret
Source§fn as_ref(&self) -> &ClientSecret
fn as_ref(&self) -> &ClientSecret
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<ClientSecret> for OwnedClientSecret
impl AsRef<ClientSecret> for OwnedClientSecret
Source§fn as_ref(&self) -> &ClientSecret
fn as_ref(&self) -> &ClientSecret
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<str> for ClientSecret
impl AsRef<str> for ClientSecret
Source§impl Borrow<ClientSecret> for OwnedClientSecret
impl Borrow<ClientSecret> for OwnedClientSecret
Source§fn borrow(&self) -> &ClientSecret
fn borrow(&self) -> &ClientSecret
Immutably borrows from an owned value. Read more
Source§impl Debug for ClientSecret
impl Debug for ClientSecret
Source§impl Display for ClientSecret
impl Display for ClientSecret
Source§impl From<&ClientSecret> for OwnedClientSecret
impl From<&ClientSecret> for OwnedClientSecret
Source§fn from(id: &ClientSecret) -> OwnedClientSecret
fn from(id: &ClientSecret) -> OwnedClientSecret
Converts to this type from the input type.
Source§impl From<&ClientSecret> for String
impl From<&ClientSecret> for String
Source§fn from(id: &ClientSecret) -> String
fn from(id: &ClientSecret) -> String
Converts to this type from the input type.
Source§impl Hash for ClientSecret
impl Hash for ClientSecret
Source§impl Ord for ClientSecret
impl Ord for ClientSecret
Source§impl PartialEq<&ClientSecret> for OwnedClientSecret
impl PartialEq<&ClientSecret> for OwnedClientSecret
Source§impl PartialEq<&str> for ClientSecret
impl PartialEq<&str> for ClientSecret
Source§impl PartialEq<ClientSecret> for &str
impl PartialEq<ClientSecret> for &str
Source§impl PartialEq<ClientSecret> for OwnedClientSecret
impl PartialEq<ClientSecret> for OwnedClientSecret
Source§impl PartialEq<ClientSecret> for str
impl PartialEq<ClientSecret> for str
Source§impl PartialEq<OwnedClientSecret> for &ClientSecret
impl PartialEq<OwnedClientSecret> for &ClientSecret
Source§impl PartialEq<OwnedClientSecret> for ClientSecret
impl PartialEq<OwnedClientSecret> for ClientSecret
Source§impl PartialEq<String> for ClientSecret
impl PartialEq<String> for ClientSecret
Source§impl PartialEq<str> for ClientSecret
impl PartialEq<str> for ClientSecret
Source§impl PartialEq for ClientSecret
impl PartialEq for ClientSecret
Source§impl PartialOrd for ClientSecret
impl PartialOrd for ClientSecret
Source§impl Serialize for ClientSecret
impl Serialize for ClientSecret
Source§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 ToOwned for ClientSecret
impl ToOwned for ClientSecret
Source§type Owned = OwnedClientSecret
type Owned = OwnedClientSecret
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> <ClientSecret as ToOwned>::Owned
fn to_owned(&self) -> <ClientSecret as ToOwned>::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more
Source§impl<'a> TryFrom<&'a str> for &'a ClientSecret
impl<'a> TryFrom<&'a str> for &'a ClientSecret
impl Eq for ClientSecret
impl StructuralPartialEq for ClientSecret
Auto Trait Implementations§
impl Freeze for ClientSecret
impl RefUnwindSafe for ClientSecret
impl Send for ClientSecret
impl !Sized for ClientSecret
impl Sync for ClientSecret
impl Unpin for ClientSecret
impl UnwindSafe for ClientSecret
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.