pub struct Base64PublicKey(/* private fields */);
Expand description
A public key encoded using unpadded base64, used as an identifier for cross-signing keys.
This string is validated using the set [a-zA-Z0-9+/=]
, but it is not validated to be decodable
as base64. This type is provided simply for its semantic value.
Implementations§
Source§impl Base64PublicKey
impl Base64PublicKey
Sourcepub fn parse(s: impl AsRef<str>) -> Result<OwnedBase64PublicKey, Error>
Available on crate feature events
only.
pub fn parse(s: impl AsRef<str>) -> Result<OwnedBase64PublicKey, Error>
events
only.Try parsing a &str
into an OwnedBase64PublicKey
.
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<Base64PublicKey>, Error>
Available on crate feature events
only.
pub fn parse_box( s: impl AsRef<str> + Into<Box<str>>, ) -> Result<Box<Base64PublicKey>, Error>
events
only.Try parsing a &str
into a Box<Base64PublicKey>
.
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 Base64PublicKey
impl AsRef<[u8]> for Base64PublicKey
Source§impl AsRef<Base64PublicKey> for Base64PublicKey
impl AsRef<Base64PublicKey> for Base64PublicKey
Source§fn as_ref(&self) -> &Base64PublicKey
fn as_ref(&self) -> &Base64PublicKey
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<Base64PublicKey> for OwnedBase64PublicKey
impl AsRef<Base64PublicKey> for OwnedBase64PublicKey
Source§fn as_ref(&self) -> &Base64PublicKey
fn as_ref(&self) -> &Base64PublicKey
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<str> for Base64PublicKey
impl AsRef<str> for Base64PublicKey
Source§impl Borrow<Base64PublicKey> for OwnedBase64PublicKey
impl Borrow<Base64PublicKey> for OwnedBase64PublicKey
Source§fn borrow(&self) -> &Base64PublicKey
fn borrow(&self) -> &Base64PublicKey
Immutably borrows from an owned value. Read more
Source§impl Clone for Box<Base64PublicKey>
impl Clone for Box<Base64PublicKey>
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 Base64PublicKey
impl Debug for Base64PublicKey
Source§impl<'de> Deserialize<'de> for Box<Base64PublicKey>
impl<'de> Deserialize<'de> for Box<Base64PublicKey>
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Box<Base64PublicKey>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Box<Base64PublicKey>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Base64PublicKey
impl Display for Base64PublicKey
Source§impl<'a> From<&'a Base64PublicKey> for &'a Base64PublicKeyOrDeviceId
impl<'a> From<&'a Base64PublicKey> for &'a Base64PublicKeyOrDeviceId
Source§fn from(value: &'a Base64PublicKey) -> &'a Base64PublicKeyOrDeviceId
fn from(value: &'a Base64PublicKey) -> &'a Base64PublicKeyOrDeviceId
Converts to this type from the input type.
Source§impl From<&Base64PublicKey> for Arc<Base64PublicKey>
impl From<&Base64PublicKey> for Arc<Base64PublicKey>
Source§fn from(s: &Base64PublicKey) -> Arc<Base64PublicKey>
fn from(s: &Base64PublicKey) -> Arc<Base64PublicKey>
Converts to this type from the input type.
Source§impl From<&Base64PublicKey> for Box<Base64PublicKey>
impl From<&Base64PublicKey> for Box<Base64PublicKey>
Source§fn from(id: &Base64PublicKey) -> Box<Base64PublicKey>
fn from(id: &Base64PublicKey) -> Box<Base64PublicKey>
Converts to this type from the input type.
Source§impl From<&Base64PublicKey> for OwnedBase64PublicKey
impl From<&Base64PublicKey> for OwnedBase64PublicKey
Source§fn from(id: &Base64PublicKey) -> OwnedBase64PublicKey
fn from(id: &Base64PublicKey) -> OwnedBase64PublicKey
Converts to this type from the input type.
Source§impl From<&Base64PublicKey> for Rc<Base64PublicKey>
impl From<&Base64PublicKey> for Rc<Base64PublicKey>
Source§fn from(s: &Base64PublicKey) -> Rc<Base64PublicKey>
fn from(s: &Base64PublicKey) -> Rc<Base64PublicKey>
Converts to this type from the input type.
Source§impl From<&Base64PublicKey> for String
impl From<&Base64PublicKey> for String
Source§fn from(id: &Base64PublicKey) -> String
fn from(id: &Base64PublicKey) -> String
Converts to this type from the input type.
Source§impl From<OwnedBase64PublicKey> for Box<Base64PublicKey>
impl From<OwnedBase64PublicKey> for Box<Base64PublicKey>
Source§fn from(a: OwnedBase64PublicKey) -> Box<Base64PublicKey>
fn from(a: OwnedBase64PublicKey) -> Box<Base64PublicKey>
Converts to this type from the input type.
Source§impl FromStr for Box<Base64PublicKey>
impl FromStr for Box<Base64PublicKey>
Source§impl Hash for Base64PublicKey
impl Hash for Base64PublicKey
Source§impl KeyName for Base64PublicKey
impl KeyName for Base64PublicKey
Source§impl Ord for Base64PublicKey
impl Ord for Base64PublicKey
Source§impl PartialEq<&Base64PublicKey> for Box<Base64PublicKey>
impl PartialEq<&Base64PublicKey> for Box<Base64PublicKey>
Source§impl PartialEq<&Base64PublicKey> for OwnedBase64PublicKey
impl PartialEq<&Base64PublicKey> for OwnedBase64PublicKey
Source§impl PartialEq<&str> for Base64PublicKey
impl PartialEq<&str> for Base64PublicKey
Source§impl PartialEq<Base64PublicKey> for &str
impl PartialEq<Base64PublicKey> for &str
Source§impl PartialEq<Base64PublicKey> for Box<Base64PublicKey>
impl PartialEq<Base64PublicKey> for Box<Base64PublicKey>
Source§impl PartialEq<Base64PublicKey> for str
impl PartialEq<Base64PublicKey> for str
Source§impl PartialEq<Box<Base64PublicKey>> for &Base64PublicKey
impl PartialEq<Box<Base64PublicKey>> for &Base64PublicKey
Source§impl PartialEq<Box<Base64PublicKey>> for Base64PublicKey
impl PartialEq<Box<Base64PublicKey>> for Base64PublicKey
Source§impl PartialEq<OwnedBase64PublicKey> for &Base64PublicKey
impl PartialEq<OwnedBase64PublicKey> for &Base64PublicKey
Source§impl PartialEq<OwnedBase64PublicKey> for Box<Base64PublicKey>
impl PartialEq<OwnedBase64PublicKey> for Box<Base64PublicKey>
Source§impl PartialEq<String> for Base64PublicKey
impl PartialEq<String> for Base64PublicKey
Source§impl PartialEq<str> for Base64PublicKey
impl PartialEq<str> for Base64PublicKey
Source§impl PartialEq for Base64PublicKey
impl PartialEq for Base64PublicKey
Source§impl PartialOrd for Base64PublicKey
impl PartialOrd for Base64PublicKey
Source§impl Serialize for Base64PublicKey
impl Serialize for Base64PublicKey
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 Base64PublicKey
impl ToOwned for Base64PublicKey
Source§type Owned = OwnedBase64PublicKey
type Owned = OwnedBase64PublicKey
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> <Base64PublicKey as ToOwned>::Owned
fn to_owned(&self) -> <Base64PublicKey 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 TryFrom<&Base64PublicKey> for Base64
impl TryFrom<&Base64PublicKey> for Base64
Source§type Error = Base64DecodeError
type Error = Base64DecodeError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &Base64PublicKey,
) -> Result<Base64, <Base64 as TryFrom<&Base64PublicKey>>::Error>
fn try_from( value: &Base64PublicKey, ) -> Result<Base64, <Base64 as TryFrom<&Base64PublicKey>>::Error>
Performs the conversion.
Source§impl<'a> TryFrom<&'a str> for &'a Base64PublicKey
impl<'a> TryFrom<&'a str> for &'a Base64PublicKey
impl Eq for Base64PublicKey
impl StructuralPartialEq for Base64PublicKey
Auto Trait Implementations§
impl Freeze for Base64PublicKey
impl RefUnwindSafe for Base64PublicKey
impl Send for Base64PublicKey
impl !Sized for Base64PublicKey
impl Sync for Base64PublicKey
impl Unpin for Base64PublicKey
impl UnwindSafe for Base64PublicKey
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.