Skip to main content

ServerSigningKeyVersion

Struct 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

Source

pub fn as_str(&self) -> &str

Creates a string slice from this ServerSigningKeyVersion.

Source

pub fn as_bytes(&self) -> &[u8]

Creates a byte slice from this ServerSigningKeyVersion.

Source§

impl ServerSigningKeyVersion

Source

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.

Source

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.

Source

pub fn parse_rc( s: impl AsRef<str> + Into<Rc<str>>, ) -> Result<Rc<Self>, IdParseError>

Try parsing a &str into an Rc<ServerSigningKeyVersion>.

Source

pub fn parse_arc( s: impl AsRef<str> + Into<Arc<str>>, ) -> Result<Arc<Self>, IdParseError>

Try parsing a &str into an Arc<ServerSigningKeyVersion>.

Trait Implementations§

Source§

impl AsRef<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion

Source§

fn as_ref(&self) -> &ServerSigningKeyVersion

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<ServerSigningKeyVersion> for ServerSigningKeyVersion

Source§

fn as_ref(&self) -> &ServerSigningKeyVersion

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<[u8]> for ServerSigningKeyVersion

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<[u8]> for Box<ServerSigningKeyVersion>

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<str> for ServerSigningKeyVersion

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<str> for Box<ServerSigningKeyVersion>

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Borrow<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion

Source§

fn borrow(&self) -> &ServerSigningKeyVersion

Immutably borrows from an owned value. Read more
Source§

impl Clone for Box<ServerSigningKeyVersion>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ServerSigningKeyVersion

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Box<ServerSigningKeyVersion>

Source§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ServerSigningKeyVersion

Source§

impl From<&ServerSigningKeyVersion> for OwnedServerSigningKeyVersion

Source§

fn from(id: &ServerSigningKeyVersion) -> OwnedServerSigningKeyVersion

Converts to this type from the input type.
Source§

impl From<&ServerSigningKeyVersion> for String

Source§

fn from(id: &ServerSigningKeyVersion) -> Self

Converts to this type from the input type.
Source§

impl From<&ServerSigningKeyVersion> for Box<ServerSigningKeyVersion>

Source§

fn from(id: &ServerSigningKeyVersion) -> Self

Converts to this type from the input type.
Source§

impl From<&ServerSigningKeyVersion> for Rc<ServerSigningKeyVersion>

Source§

fn from(s: &ServerSigningKeyVersion) -> Rc<ServerSigningKeyVersion>

Converts to this type from the input type.
Source§

impl From<&ServerSigningKeyVersion> for Arc<ServerSigningKeyVersion>

Source§

fn from(s: &ServerSigningKeyVersion) -> Arc<ServerSigningKeyVersion>

Converts to this type from the input type.
Source§

impl From<Box<ServerSigningKeyVersion>> for OwnedServerSigningKeyVersion

Source§

fn from(b: Box<ServerSigningKeyVersion>) -> OwnedServerSigningKeyVersion

Converts to this type from the input type.
Source§

impl From<Box<ServerSigningKeyVersion>> for String

Source§

fn from(id: Box<ServerSigningKeyVersion>) -> Self

Converts to this type from the input type.
Source§

impl From<OwnedServerSigningKeyVersion> for Box<ServerSigningKeyVersion>

Source§

fn from(a: OwnedServerSigningKeyVersion) -> Box<ServerSigningKeyVersion>

Converts to this type from the input type.
Source§

impl FromStr for Box<ServerSigningKeyVersion>

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for ServerSigningKeyVersion

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
Source§

impl Ord for ServerSigningKeyVersion

Source§

fn cmp(&self, other: &ServerSigningKeyVersion) -> Ordering

This method returns an Ordering between self and other. Read more
Source§

impl PartialEq for ServerSigningKeyVersion

Source§

fn eq(&self, other: &ServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<&ServerSigningKeyVersion> for OwnedServerSigningKeyVersion

Source§

fn eq(&self, other: &&ServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<&ServerSigningKeyVersion> for Box<ServerSigningKeyVersion>

Source§

fn eq(&self, other: &&ServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<&str> for ServerSigningKeyVersion

Source§

fn eq(&self, other: &&str) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<&str> for Box<ServerSigningKeyVersion>

Source§

fn eq(&self, other: &&str) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<Box<ServerSigningKeyVersion>> for OwnedServerSigningKeyVersion

Source§

fn eq(&self, other: &Box<ServerSigningKeyVersion>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<Box<ServerSigningKeyVersion>> for ServerSigningKeyVersion

Source§

fn eq(&self, other: &Box<ServerSigningKeyVersion>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<Box<ServerSigningKeyVersion>> for &ServerSigningKeyVersion

Source§

fn eq(&self, other: &Box<ServerSigningKeyVersion>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<Box<ServerSigningKeyVersion>> for str

Source§

fn eq(&self, other: &Box<ServerSigningKeyVersion>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<Box<ServerSigningKeyVersion>> for &str

Source§

fn eq(&self, other: &Box<ServerSigningKeyVersion>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<Box<ServerSigningKeyVersion>> for String

Source§

fn eq(&self, other: &Box<ServerSigningKeyVersion>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<OwnedServerSigningKeyVersion> for ServerSigningKeyVersion

Source§

fn eq(&self, other: &OwnedServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<OwnedServerSigningKeyVersion> for &ServerSigningKeyVersion

Source§

fn eq(&self, other: &OwnedServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<OwnedServerSigningKeyVersion> for Box<ServerSigningKeyVersion>

Source§

fn eq(&self, other: &OwnedServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<ServerSigningKeyVersion> for OwnedServerSigningKeyVersion

Source§

fn eq(&self, other: &ServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<ServerSigningKeyVersion> for Box<ServerSigningKeyVersion>

Source§

fn eq(&self, other: &ServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<ServerSigningKeyVersion> for str

Source§

fn eq(&self, other: &ServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<ServerSigningKeyVersion> for &str

Source§

fn eq(&self, other: &ServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<ServerSigningKeyVersion> for String

Source§

fn eq(&self, other: &ServerSigningKeyVersion) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<String> for ServerSigningKeyVersion

Source§

fn eq(&self, other: &String) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<String> for Box<ServerSigningKeyVersion>

Source§

fn eq(&self, other: &String) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<str> for ServerSigningKeyVersion

Source§

fn eq(&self, other: &str) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<str> for Box<ServerSigningKeyVersion>

Source§

fn eq(&self, other: &str) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for ServerSigningKeyVersion

Source§

fn partial_cmp(&self, other: &ServerSigningKeyVersion) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for ServerSigningKeyVersion

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ServerSigningKeyVersion

Source§

impl ToOwned for ServerSigningKeyVersion

Source§

type Owned = OwnedServerSigningKeyVersion

The resulting type after obtaining ownership.
Source§

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)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl ToSql<Nullable<Text>, Pg> for &ServerSigningKeyVersion

Source§

fn to_sql(&self, out: &mut Output<'_, '_, Pg>) -> Result

See the trait documentation.
Source§

impl ToSql<Text, Pg> for &ServerSigningKeyVersion

Source§

fn to_sql(&self, out: &mut Output<'_, '_, Pg>) -> Result

See the trait documentation.
Source§

impl<'a> TryFrom<&'a str> for &'a ServerSigningKeyVersion

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(s: &'a str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&str> for Box<ServerSigningKeyVersion>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(s: &str) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<String> for Box<ServerSigningKeyVersion>

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(s: String) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T, W> HasTypeWitness<W> for T
where W: MakeTypeWitness<Arg = T>, T: ?Sized,

Source§

const WITNESS: W = W::MAKE

A constant of the type witness
Source§

impl<T> Identity for T
where T: ?Sized,

Source§

const TYPE_EQ: TypeEq<T, <T as Identity>::Type> = TypeEq::NEW

Proof that Self is the same type as Self::Type, provides methods for casting between Self and Self::Type.
Source§

type Type = T

The same type as Self, used to emulate type equality bounds (T == U) with associated type equality constraints (T: Identity<Type = U>).
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more