Struct StdAddrBase64Repr

Source
pub struct StdAddrBase64Repr<const URL_SAFE: bool = true>;
Expand description

A helper struct to work with base64-encoded addresses.

Implementations§

Source§

impl<const URL_SAFE: bool> StdAddrBase64Repr<URL_SAFE>

Source

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

Serializes address into a base64-encoded string.

Source

pub fn deserialize<'de, D>(deserializer: D) -> Result<StdAddr, D::Error>
where D: Deserializer<'de>,

Deserializes address as a base64-encoded string.

Auto Trait Implementations§

§

impl<const URL_SAFE: bool> Freeze for StdAddrBase64Repr<URL_SAFE>

§

impl<const URL_SAFE: bool> RefUnwindSafe for StdAddrBase64Repr<URL_SAFE>

§

impl<const URL_SAFE: bool> Send for StdAddrBase64Repr<URL_SAFE>

§

impl<const URL_SAFE: bool> Sync for StdAddrBase64Repr<URL_SAFE>

§

impl<const URL_SAFE: bool> Unpin for StdAddrBase64Repr<URL_SAFE>

§

impl<const URL_SAFE: bool> UnwindSafe for StdAddrBase64Repr<URL_SAFE>

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

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

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> EquivalentRepr<T> for T