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
Sourcepub fn parse(s: impl AsRef<str> + Into<Box<str>>) -> Result<Box<Self>, Error>
pub fn parse(s: impl AsRef<str> + Into<Box<str>>) -> Result<Box<Self>, Error>
Try parsing a &str into a Box<ClientSecret>.
The same can also be done using FromStr, TryFrom or TryInto.
This function is simply more constrained and thus useful in generic contexts.
Trait Implementations§
Source§impl AsRef<str> for ClientSecret
impl AsRef<str> for ClientSecret
Source§impl Clone for Box<ClientSecret>
impl Clone for Box<ClientSecret>
Source§impl Debug for ClientSecret
impl Debug for ClientSecret
Source§impl<'de> Deserialize<'de> for Box<ClientSecret>
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Box<ClientSecret>
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ClientSecret
impl Display for ClientSecret
Source§impl From<&ClientSecret> for Arc<ClientSecret>
impl From<&ClientSecret> for Arc<ClientSecret>
Source§fn from(s: &ClientSecret) -> Arc<ClientSecret>
fn from(s: &ClientSecret) -> Arc<ClientSecret>
Converts to this type from the input type.
Source§impl From<&ClientSecret> for Box<ClientSecret>
impl From<&ClientSecret> for Box<ClientSecret>
Source§fn from(id: &ClientSecret) -> Self
fn from(id: &ClientSecret) -> Self
Converts to this type from the input type.
Source§impl From<&ClientSecret> for Rc<ClientSecret>
impl From<&ClientSecret> for Rc<ClientSecret>
Source§fn from(s: &ClientSecret) -> Rc<ClientSecret>
fn from(s: &ClientSecret) -> Rc<ClientSecret>
Converts to this type from the input type.
Source§impl FromStr for Box<ClientSecret>
impl FromStr for Box<ClientSecret>
Source§impl Hash for ClientSecret
impl Hash for ClientSecret
Source§impl Ord for ClientSecret
impl Ord for ClientSecret
Source§impl PartialEq<&ClientSecret> for Box<ClientSecret>
impl PartialEq<&ClientSecret> for Box<ClientSecret>
Source§impl PartialEq<&str> for ClientSecret
impl PartialEq<&str> for ClientSecret
Source§impl PartialEq<Box<ClientSecret>> for &ClientSecret
impl PartialEq<Box<ClientSecret>> for &ClientSecret
Source§impl PartialEq<Box<ClientSecret>> for ClientSecret
impl PartialEq<Box<ClientSecret>> for ClientSecret
Source§impl PartialEq<ClientSecret> for &str
impl PartialEq<ClientSecret> for &str
Source§impl PartialEq<ClientSecret> for Box<ClientSecret>
impl PartialEq<ClientSecret> for Box<ClientSecret>
Source§impl PartialEq<ClientSecret> for String
impl PartialEq<ClientSecret> for String
Source§impl PartialEq<ClientSecret> for str
impl PartialEq<ClientSecret> for str
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
Available on crate feature serde only.
impl Serialize for ClientSecret
Available on crate feature
serde only.Source§impl ToOwned for ClientSecret
impl ToOwned for ClientSecret
Source§type Owned = Box<ClientSecret>
type Owned = Box<ClientSecret>
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::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