pub struct SessionId(/* private fields */);Expand description
A session ID.
Session IDs in Matrix are opaque character sequences of [0-9a-zA-Z.=_-]. Their length must
must not exceed 255 characters.
Implementations§
Source§impl SessionId
impl SessionId
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<SessionId>.
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<'de> Deserialize<'de> for Box<SessionId>
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Box<SessionId>
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