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, IdParseError>
pub fn parse( s: impl AsRef<str>, ) -> Result<OwnedServerSigningKeyVersion, IdParseError>
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<Self>, IdParseError>
pub fn parse_box( s: impl AsRef<str> + Into<Box<str>>, ) -> Result<Box<Self>, IdParseError>
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>
Source§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<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 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) -> Self
fn from(id: &ServerSigningKeyVersion) -> Self
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) -> Self
fn from(id: &ServerSigningKeyVersion) -> Self
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 FromStr for Box<ServerSigningKeyVersion>
impl FromStr for Box<ServerSigningKeyVersion>
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 Box<ServerSigningKeyVersion>
impl PartialEq<OwnedServerSigningKeyVersion> for Box<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 String
impl PartialEq<ServerSigningKeyVersion> for String
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§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) -> 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
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.