Struct Base64Bcs

Source
pub struct Base64Bcs<Alphabet = Standard, Padding = Padded>(/* private fields */)
where
    Alphabet: Alphabet,
    Padding: Format;
Expand description

Serialize values with base64-encoded BCS.

The type serializes a value as a base64 string of its BCS encoding. It works on any type compatible with bcs for (de)serialization.

Trait Implementations§

Source§

impl<'de, T, Alphabet, Padding> DeserializeAs<'de, T> for Base64Bcs<Alphabet, Padding>
where Alphabet: Alphabet, Padding: Format, T: for<'a> Deserialize<'a>,

Source§

fn deserialize_as<D>(deserializer: D) -> Result<T, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer.
Source§

impl<T, Alphabet> SerializeAs<T> for Base64Bcs<Alphabet, Padded>
where Alphabet: Alphabet, T: Serialize,

Source§

fn serialize_as<S>(source: &T, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer.
Source§

impl<T, Alphabet> SerializeAs<T> for Base64Bcs<Alphabet, Unpadded>
where Alphabet: Alphabet, T: Serialize,

Source§

fn serialize_as<S>(source: &T, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer.

Auto Trait Implementations§

§

impl<Alphabet, Padding> Freeze for Base64Bcs<Alphabet, Padding>

§

impl<Alphabet, Padding> RefUnwindSafe for Base64Bcs<Alphabet, Padding>
where Alphabet: RefUnwindSafe, Padding: RefUnwindSafe,

§

impl<Alphabet, Padding> Send for Base64Bcs<Alphabet, Padding>
where Alphabet: Send, Padding: Send,

§

impl<Alphabet, Padding> Sync for Base64Bcs<Alphabet, Padding>
where Alphabet: Sync, Padding: Sync,

§

impl<Alphabet, Padding> Unpin for Base64Bcs<Alphabet, Padding>
where Alphabet: Unpin, Padding: Unpin,

§

impl<Alphabet, Padding> UnwindSafe for Base64Bcs<Alphabet, Padding>
where Alphabet: UnwindSafe, Padding: UnwindSafe,

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<U> As for U

Source§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. 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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V