Struct ServerSigningKeyVersion
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§
§impl ServerSigningKeyVersion
impl ServerSigningKeyVersion
pub fn parse(s: impl AsRef<str>) -> Result<OwnedServerSigningKeyVersion, Error>
pub fn parse(s: impl AsRef<str>) -> Result<OwnedServerSigningKeyVersion, Error>
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.
pub fn parse_box(
s: impl AsRef<str> + Into<Box<str>>,
) -> Result<Box<ServerSigningKeyVersion>, Error>
pub fn parse_box( s: impl AsRef<str> + Into<Box<str>>, ) -> Result<Box<ServerSigningKeyVersion>, Error>
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§
§impl AsRef<[u8]> for Box<ServerSigningKeyVersion>
impl AsRef<[u8]> for Box<ServerSigningKeyVersion>
§impl AsRef<[u8]> for ServerSigningKeyVersion
impl AsRef<[u8]> for ServerSigningKeyVersion
§impl AsRef<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
impl AsRef<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
§fn as_ref(&self) -> &ServerSigningKeyVersion
fn as_ref(&self) -> &ServerSigningKeyVersion
Converts this type into a shared reference of the (usually inferred) input type.
§impl AsRef<ServerSigningKeyVersion> for ServerSigningKeyVersion
impl AsRef<ServerSigningKeyVersion> for ServerSigningKeyVersion
§fn as_ref(&self) -> &ServerSigningKeyVersion
fn as_ref(&self) -> &ServerSigningKeyVersion
Converts this type into a shared reference of the (usually inferred) input type.
§impl AsRef<str> for Box<ServerSigningKeyVersion>
impl AsRef<str> for Box<ServerSigningKeyVersion>
§impl AsRef<str> for ServerSigningKeyVersion
impl AsRef<str> for ServerSigningKeyVersion
§impl Borrow<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
impl Borrow<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
§fn borrow(&self) -> &ServerSigningKeyVersion
fn borrow(&self) -> &ServerSigningKeyVersion
Immutably borrows from an owned value. Read more
§impl Clone for Box<ServerSigningKeyVersion>
impl Clone for Box<ServerSigningKeyVersion>
§fn clone(&self) -> Box<ServerSigningKeyVersion>
fn clone(&self) -> Box<ServerSigningKeyVersion>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for ServerSigningKeyVersion
impl Debug for ServerSigningKeyVersion
§impl<'de> Deserialize<'de> for Box<ServerSigningKeyVersion>
impl<'de> Deserialize<'de> for Box<ServerSigningKeyVersion>
§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
§impl Display for ServerSigningKeyVersion
impl Display for ServerSigningKeyVersion
§impl From<&ServerSigningKeyVersion> for Arc<ServerSigningKeyVersion>
impl From<&ServerSigningKeyVersion> for Arc<ServerSigningKeyVersion>
§fn from(s: &ServerSigningKeyVersion) -> Arc<ServerSigningKeyVersion>
fn from(s: &ServerSigningKeyVersion) -> Arc<ServerSigningKeyVersion>
Converts to this type from the input type.
§impl From<&ServerSigningKeyVersion> for Box<ServerSigningKeyVersion>
impl From<&ServerSigningKeyVersion> for Box<ServerSigningKeyVersion>
§fn from(id: &ServerSigningKeyVersion) -> Box<ServerSigningKeyVersion>
fn from(id: &ServerSigningKeyVersion) -> Box<ServerSigningKeyVersion>
Converts to this type from the input type.
§impl From<&ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
impl From<&ServerSigningKeyVersion> for OwnedServerSigningKeyVersion
§fn from(id: &ServerSigningKeyVersion) -> OwnedServerSigningKeyVersion
fn from(id: &ServerSigningKeyVersion) -> OwnedServerSigningKeyVersion
Converts to this type from the input type.
§impl From<&ServerSigningKeyVersion> for Rc<ServerSigningKeyVersion>
impl From<&ServerSigningKeyVersion> for Rc<ServerSigningKeyVersion>
§fn from(s: &ServerSigningKeyVersion) -> Rc<ServerSigningKeyVersion>
fn from(s: &ServerSigningKeyVersion) -> Rc<ServerSigningKeyVersion>
Converts to this type from the input type.
§impl From<&ServerSigningKeyVersion> for String
impl From<&ServerSigningKeyVersion> for String
§fn from(id: &ServerSigningKeyVersion) -> String
fn from(id: &ServerSigningKeyVersion) -> String
Converts to this type from the input type.
§impl From<OwnedServerSigningKeyVersion> for Box<ServerSigningKeyVersion>
impl From<OwnedServerSigningKeyVersion> for Box<ServerSigningKeyVersion>
§fn from(a: OwnedServerSigningKeyVersion) -> Box<ServerSigningKeyVersion>
fn from(a: OwnedServerSigningKeyVersion) -> Box<ServerSigningKeyVersion>
Converts to this type from the input type.
§impl FromStr for Box<ServerSigningKeyVersion>
impl FromStr for Box<ServerSigningKeyVersion>
§impl Hash for ServerSigningKeyVersion
impl Hash for ServerSigningKeyVersion
§impl KeyName for ServerSigningKeyVersion
impl KeyName for ServerSigningKeyVersion
§impl Ord for ServerSigningKeyVersion
impl Ord for ServerSigningKeyVersion
§impl PartialEq<&ServerSigningKeyVersion> for Box<ServerSigningKeyVersion>
impl PartialEq<&ServerSigningKeyVersion> for Box<ServerSigningKeyVersion>
§impl PartialEq<&str> for Box<ServerSigningKeyVersion>
impl PartialEq<&str> for Box<ServerSigningKeyVersion>
§impl PartialEq<&str> for ServerSigningKeyVersion
impl PartialEq<&str> for ServerSigningKeyVersion
§impl PartialEq<Box<ServerSigningKeyVersion>> for &ServerSigningKeyVersion
impl PartialEq<Box<ServerSigningKeyVersion>> for &ServerSigningKeyVersion
§impl PartialEq<ServerSigningKeyVersion> for &str
impl PartialEq<ServerSigningKeyVersion> for &str
§impl PartialEq<ServerSigningKeyVersion> for String
impl PartialEq<ServerSigningKeyVersion> for String
§impl PartialEq<ServerSigningKeyVersion> for str
impl PartialEq<ServerSigningKeyVersion> for str
§impl PartialEq<String> for Box<ServerSigningKeyVersion>
impl PartialEq<String> for Box<ServerSigningKeyVersion>
§impl PartialEq<String> for ServerSigningKeyVersion
impl PartialEq<String> for ServerSigningKeyVersion
§impl PartialEq<str> for Box<ServerSigningKeyVersion>
impl PartialEq<str> for Box<ServerSigningKeyVersion>
§impl PartialEq<str> for ServerSigningKeyVersion
impl PartialEq<str> for ServerSigningKeyVersion
§impl PartialEq for ServerSigningKeyVersion
impl PartialEq for ServerSigningKeyVersion
§impl PartialOrd for ServerSigningKeyVersion
impl PartialOrd for ServerSigningKeyVersion
§impl Serialize for ServerSigningKeyVersion
impl Serialize for ServerSigningKeyVersion
§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
§impl ToOwned for ServerSigningKeyVersion
impl ToOwned for ServerSigningKeyVersion
§type Owned = OwnedServerSigningKeyVersion
type Owned = OwnedServerSigningKeyVersion
The resulting type after obtaining ownership.
§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
§impl<'a> TryFrom<&'a str> for &'a ServerSigningKeyVersion
impl<'a> TryFrom<&'a str> for &'a ServerSigningKeyVersion
§impl TryFrom<&str> for Box<ServerSigningKeyVersion>
impl TryFrom<&str> for Box<ServerSigningKeyVersion>
§impl TryFrom<String> for Box<ServerSigningKeyVersion>
impl TryFrom<String> for Box<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.