pub enum MultibaseEncoding {
Base32Lower,
Base58Btc,
Base64,
Base64Url,
Base32Upper,
}Expand description
Multibase encoding options for CID string representation
Variants§
Base32Lower
Base32 lower case (default for CIDv1, starts with ‘b’)
Base58Btc
Base58 Bitcoin (classic IPFS format, starts with ‘z’ for CIDv1)
Base64
Base64 standard (starts with ‘m’)
Base64Url
Base64 URL-safe (starts with ‘u’)
Base32Upper
Base32 upper case (starts with ‘B’)
Implementations§
Source§impl MultibaseEncoding
impl MultibaseEncoding
Sourcepub const fn from_prefix(c: char) -> Option<Self>
pub const fn from_prefix(c: char) -> Option<Self>
Detect encoding from a CID string prefix
Sourcepub const fn all() -> &'static [MultibaseEncoding]
pub const fn all() -> &'static [MultibaseEncoding]
Get all available multibase encodings
Trait Implementations§
Source§impl Clone for MultibaseEncoding
impl Clone for MultibaseEncoding
Source§fn clone(&self) -> MultibaseEncoding
fn clone(&self) -> MultibaseEncoding
Returns a duplicate 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 moreSource§impl Debug for MultibaseEncoding
impl Debug for MultibaseEncoding
Source§impl Default for MultibaseEncoding
impl Default for MultibaseEncoding
Source§fn default() -> MultibaseEncoding
fn default() -> MultibaseEncoding
Returns the “default value” for a type. Read more
Source§impl Display for MultibaseEncoding
impl Display for MultibaseEncoding
Source§impl PartialEq for MultibaseEncoding
impl PartialEq for MultibaseEncoding
impl Copy for MultibaseEncoding
impl Eq for MultibaseEncoding
impl StructuralPartialEq for MultibaseEncoding
Auto Trait Implementations§
impl Freeze for MultibaseEncoding
impl RefUnwindSafe for MultibaseEncoding
impl Send for MultibaseEncoding
impl Sync for MultibaseEncoding
impl Unpin for MultibaseEncoding
impl UnwindSafe for MultibaseEncoding
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more