Struct ruma::ServerSigningKeyVersion
source · pub struct ServerSigningKeyVersion(/* private fields */);
Expand description
The version of a homeserver signing key.
This is an opaque character sequences of [a-zA-Z0-9_]
. This type is provided simply for its
semantic value.
With the compat-server-signing-key-version
cargo feature, the validation of this type is
relaxed to accept any string.
Implementations§
source§impl ServerSigningKeyVersion
impl ServerSigningKeyVersion
sourcepub fn parse(s: impl AsRef<str>) -> Result<OwnedServerSigningKeyVersion, Error>
Available on crate feature events
only.
pub fn parse(s: impl AsRef<str>) -> Result<OwnedServerSigningKeyVersion, Error>
events
only.Try parsing a &str
into an OwnedServerSigningKeyVersion
.
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>>,
) -> Result<Box<ServerSigningKeyVersion>, Error>
Available on crate feature events
only.
pub fn parse_box( s: impl AsRef<str> + Into<Box<str>>, ) -> Result<Box<ServerSigningKeyVersion>, Error>
events
only.Try parsing a &str
into a Box<ServerSigningKeyVersion>
.
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<[u8]> for ServerSigningKeyVersion
impl AsRef<[u8]> for ServerSigningKeyVersion
source§impl AsRef<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
impl AsRef<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
source§fn as_ref(&self) -> &ServerSigningKeyVersion
fn as_ref(&self) -> &ServerSigningKeyVersion
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<ServerSigningKeyVersion> for ServerSigningKeyVersion
impl AsRef<ServerSigningKeyVersion> for ServerSigningKeyVersion
source§fn as_ref(&self) -> &ServerSigningKeyVersion
fn as_ref(&self) -> &ServerSigningKeyVersion
Converts this type into a shared reference of the (usually inferred) input type.
source§impl AsRef<str> for ServerSigningKeyVersion
impl AsRef<str> for ServerSigningKeyVersion
source§impl Borrow<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
impl Borrow<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
source§fn borrow(&self) -> &ServerSigningKeyVersion
fn borrow(&self) -> &ServerSigningKeyVersion
Immutably borrows from an owned value. Read more
source§impl Clone for Box<ServerSigningKeyVersion>
impl Clone for Box<ServerSigningKeyVersion>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ServerSigningKeyVersion
impl Debug for ServerSigningKeyVersion
source§impl<'de> Deserialize<'de> for Box<ServerSigningKeyVersion>
impl<'de> Deserialize<'de> for Box<ServerSigningKeyVersion>
source§fn deserialize<D>(
deserializer: D,
) -> Result<Box<ServerSigningKeyVersion>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Box<ServerSigningKeyVersion>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ServerSigningKeyVersion
impl Display for ServerSigningKeyVersion
source§impl From<&ServerSigningKeyVersion> for Arc<ServerSigningKeyVersion>
impl From<&ServerSigningKeyVersion> for Arc<ServerSigningKeyVersion>
source§fn from(s: &ServerSigningKeyVersion) -> Arc<ServerSigningKeyVersion>
fn from(s: &ServerSigningKeyVersion) -> Arc<ServerSigningKeyVersion>
Converts to this type from the input type.
source§impl From<&ServerSigningKeyVersion> for Box<ServerSigningKeyVersion>
impl From<&ServerSigningKeyVersion> for Box<ServerSigningKeyVersion>
source§fn from(id: &ServerSigningKeyVersion) -> Box<ServerSigningKeyVersion>
fn from(id: &ServerSigningKeyVersion) -> Box<ServerSigningKeyVersion>
Converts to this type from the input type.
source§impl From<&ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
impl From<&ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
source§fn from(id: &ServerSigningKeyVersion) -> OwnedServerSigningKeyVersion
fn from(id: &ServerSigningKeyVersion) -> OwnedServerSigningKeyVersion
Converts to this type from the input type.
source§impl From<&ServerSigningKeyVersion> for Rc<ServerSigningKeyVersion>
impl From<&ServerSigningKeyVersion> for Rc<ServerSigningKeyVersion>
source§fn from(s: &ServerSigningKeyVersion) -> Rc<ServerSigningKeyVersion>
fn from(s: &ServerSigningKeyVersion) -> Rc<ServerSigningKeyVersion>
Converts to this type from the input type.
source§impl From<&ServerSigningKeyVersion> for String
impl From<&ServerSigningKeyVersion> for String
source§fn from(id: &ServerSigningKeyVersion) -> String
fn from(id: &ServerSigningKeyVersion) -> String
Converts to this type from the input type.
source§impl From<OwnedServerSigningKeyVersion> for Box<ServerSigningKeyVersion>
impl From<OwnedServerSigningKeyVersion> for Box<ServerSigningKeyVersion>
source§fn from(a: OwnedServerSigningKeyVersion) -> Box<ServerSigningKeyVersion>
fn from(a: OwnedServerSigningKeyVersion) -> Box<ServerSigningKeyVersion>
Converts to this type from the input type.
source§impl Hash for ServerSigningKeyVersion
impl Hash for ServerSigningKeyVersion
source§impl KeyName for ServerSigningKeyVersion
impl KeyName for ServerSigningKeyVersion
source§impl Ord for ServerSigningKeyVersion
impl Ord for ServerSigningKeyVersion
source§impl PartialEq<&str> for ServerSigningKeyVersion
impl PartialEq<&str> for ServerSigningKeyVersion
source§impl PartialEq<Box<ServerSigningKeyVersion>> for &ServerSigningKeyVersion
impl PartialEq<Box<ServerSigningKeyVersion>> for &ServerSigningKeyVersion
source§impl PartialEq<Box<ServerSigningKeyVersion>> for ServerSigningKeyVersion
impl PartialEq<Box<ServerSigningKeyVersion>> for ServerSigningKeyVersion
source§impl PartialEq<OwnedServerSigningKeyVersion> for &ServerSigningKeyVersion
impl PartialEq<OwnedServerSigningKeyVersion> for &ServerSigningKeyVersion
source§fn eq(&self, other: &OwnedServerSigningKeyVersion) -> bool
fn eq(&self, other: &OwnedServerSigningKeyVersion) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.source§impl PartialEq<OwnedServerSigningKeyVersion> for ServerSigningKeyVersion
impl PartialEq<OwnedServerSigningKeyVersion> for ServerSigningKeyVersion
source§fn eq(&self, other: &OwnedServerSigningKeyVersion) -> bool
fn eq(&self, other: &OwnedServerSigningKeyVersion) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.source§impl PartialEq<ServerSigningKeyVersion> for &str
impl PartialEq<ServerSigningKeyVersion> for &str
source§impl PartialEq<ServerSigningKeyVersion> for str
impl PartialEq<ServerSigningKeyVersion> for str
source§impl PartialEq<String> for ServerSigningKeyVersion
impl PartialEq<String> for ServerSigningKeyVersion
source§impl PartialEq<str> for ServerSigningKeyVersion
impl PartialEq<str> for ServerSigningKeyVersion
source§impl PartialEq for ServerSigningKeyVersion
impl PartialEq for ServerSigningKeyVersion
source§impl PartialOrd for ServerSigningKeyVersion
impl PartialOrd for ServerSigningKeyVersion
source§impl Serialize for ServerSigningKeyVersion
impl Serialize for ServerSigningKeyVersion
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 ServerSigningKeyVersion
impl ToOwned for ServerSigningKeyVersion
source§type Owned = OwnedServerSigningKeyVersion
type Owned = OwnedServerSigningKeyVersion
The resulting type after obtaining ownership.
source§fn to_owned(&self) -> <ServerSigningKeyVersion as ToOwned>::Owned
fn to_owned(&self) -> <ServerSigningKeyVersion 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 ServerSigningKeyVersion
impl<'a> TryFrom<&'a str> for &'a ServerSigningKeyVersion
impl Eq for ServerSigningKeyVersion
impl StructuralPartialEq for ServerSigningKeyVersion
Auto Trait Implementations§
impl Freeze for ServerSigningKeyVersion
impl RefUnwindSafe for ServerSigningKeyVersion
impl Send for ServerSigningKeyVersion
impl !Sized for ServerSigningKeyVersion
impl Sync for ServerSigningKeyVersion
impl Unpin for ServerSigningKeyVersion
impl UnwindSafe for ServerSigningKeyVersion
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.