Struct ClientSecret
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§
§impl ClientSecret
impl ClientSecret
§impl ClientSecret
impl ClientSecret
§impl ClientSecret
impl ClientSecret
pub fn new() -> OwnedClientSecret
Available on crate feature rand only.
pub fn new() -> OwnedClientSecret
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§
§impl AsRef<[u8]> for ClientSecret
impl AsRef<[u8]> for ClientSecret
§impl AsRef<ClientSecret> for ClientSecret
impl AsRef<ClientSecret> for ClientSecret
§fn as_ref(&self) -> &ClientSecret
fn as_ref(&self) -> &ClientSecret
Converts this type into a shared reference of the (usually inferred) input type.
§impl AsRef<ClientSecret> for OwnedClientSecret
impl AsRef<ClientSecret> for OwnedClientSecret
§fn as_ref(&self) -> &ClientSecret
fn as_ref(&self) -> &ClientSecret
Converts this type into a shared reference of the (usually inferred) input type.
§impl AsRef<str> for ClientSecret
impl AsRef<str> for ClientSecret
§impl Borrow<ClientSecret> for OwnedClientSecret
impl Borrow<ClientSecret> for OwnedClientSecret
§fn borrow(&self) -> &ClientSecret
fn borrow(&self) -> &ClientSecret
Immutably borrows from an owned value. Read more
§impl Debug for ClientSecret
impl Debug for ClientSecret
§impl Display for ClientSecret
impl Display for ClientSecret
§impl From<&ClientSecret> for OwnedClientSecret
impl From<&ClientSecret> for OwnedClientSecret
§fn from(id: &ClientSecret) -> OwnedClientSecret
fn from(id: &ClientSecret) -> OwnedClientSecret
Converts to this type from the input type.
§impl From<&ClientSecret> for String
impl From<&ClientSecret> for String
§fn from(id: &ClientSecret) -> String
fn from(id: &ClientSecret) -> String
Converts to this type from the input type.
§impl Hash for ClientSecret
impl Hash for ClientSecret
§impl Ord for ClientSecret
impl Ord for ClientSecret
§impl PartialEq<&ClientSecret> for OwnedClientSecret
impl PartialEq<&ClientSecret> for OwnedClientSecret
§impl PartialEq<&str> for ClientSecret
impl PartialEq<&str> for ClientSecret
§impl PartialEq<ClientSecret> for &str
impl PartialEq<ClientSecret> for &str
§impl PartialEq<ClientSecret> for OwnedClientSecret
impl PartialEq<ClientSecret> for OwnedClientSecret
§impl PartialEq<ClientSecret> for String
impl PartialEq<ClientSecret> for String
§impl PartialEq<ClientSecret> for str
impl PartialEq<ClientSecret> for str
§impl<'a> PartialEq<Cow<'a, str>> for ClientSecret
impl<'a> PartialEq<Cow<'a, str>> for ClientSecret
§impl PartialEq<OwnedClientSecret> for &ClientSecret
impl PartialEq<OwnedClientSecret> for &ClientSecret
§impl PartialEq<OwnedClientSecret> for ClientSecret
impl PartialEq<OwnedClientSecret> for ClientSecret
§impl PartialEq<String> for ClientSecret
impl PartialEq<String> for ClientSecret
§impl PartialEq<str> for ClientSecret
impl PartialEq<str> for ClientSecret
§impl PartialEq for ClientSecret
impl PartialEq for ClientSecret
§impl PartialOrd for ClientSecret
impl PartialOrd for ClientSecret
§impl Serialize for ClientSecret
impl Serialize for ClientSecret
§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
§impl ToOwned for ClientSecret
impl ToOwned for ClientSecret
§type Owned = OwnedClientSecret
type Owned = OwnedClientSecret
The resulting type after obtaining ownership.
§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
§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 UnsafeUnpin 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.