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