pub struct SessionId(_);
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>) -> Result<OwnedSessionId, Error>
pub fn parse(s: impl AsRef<str>) -> Result<OwnedSessionId, Error>
Try parsing a &str
into an OwnedSessionId
.
The same can also be done using FromStr
, TryFrom
or TryInto
.
This function is simply more constrained and thus useful in generic contexts.
sourcepub fn parse_box(
s: impl AsRef<str> + Into<Box<str, Global>>
) -> Result<Box<SessionId, Global>, Error>
pub fn parse_box(
s: impl AsRef<str> + Into<Box<str, Global>>
) -> Result<Box<SessionId, Global>, 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 AsRef<SessionId> for OwnedSessionId
impl AsRef<SessionId> for OwnedSessionId
source§impl Borrow<SessionId> for OwnedSessionId
impl Borrow<SessionId> for OwnedSessionId
source§impl<'de> Deserialize<'de> for Box<SessionId, Global>
impl<'de> Deserialize<'de> for Box<SessionId, Global>
source§fn deserialize<D>(
deserializer: D
) -> Result<Box<SessionId, Global>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D
) -> Result<Box<SessionId, Global>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<&SessionId> for OwnedSessionId
impl From<&SessionId> for OwnedSessionId
source§fn from(id: &SessionId) -> OwnedSessionId
fn from(id: &SessionId) -> OwnedSessionId
Converts to this type from the input type.
source§impl PartialEq<&SessionId> for OwnedSessionId
impl PartialEq<&SessionId> for OwnedSessionId
source§impl PartialEq<&str> for SessionId
impl PartialEq<&str> for SessionId
source§impl PartialEq<Box<SessionId, Global>> for &SessionId
impl PartialEq<Box<SessionId, Global>> for &SessionId
source§impl PartialEq<Box<SessionId, Global>> for SessionId
impl PartialEq<Box<SessionId, Global>> for SessionId
source§impl PartialEq<OwnedSessionId> for &SessionId
impl PartialEq<OwnedSessionId> for &SessionId
source§fn eq(&self, other: &OwnedSessionId) -> bool
fn eq(&self, other: &OwnedSessionId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<OwnedSessionId> for SessionId
impl PartialEq<OwnedSessionId> for SessionId
source§fn eq(&self, other: &OwnedSessionId) -> bool
fn eq(&self, other: &OwnedSessionId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<SessionId> for &str
impl PartialEq<SessionId> for &str
source§impl PartialEq<SessionId> for OwnedSessionId
impl PartialEq<SessionId> for OwnedSessionId
source§impl PartialEq<SessionId> for SessionId
impl PartialEq<SessionId> for SessionId
source§impl PartialEq<SessionId> for str
impl PartialEq<SessionId> for str
source§impl PartialEq<String> for SessionId
impl PartialEq<String> for SessionId
source§impl PartialOrd<SessionId> for SessionId
impl PartialOrd<SessionId> for SessionId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for SessionId
impl Serialize for SessionId
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 SessionId
impl ToOwned for SessionId
§type Owned = OwnedSessionId
type Owned = OwnedSessionId
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> <SessionId as ToOwned>::Owned
fn to_owned(&self) -> <SessionId 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