Enum aptos_cli_common::EncodingType
source · [−]pub enum EncodingType {
BCS,
Hex,
Base64,
}Expand description
Types of encodings used by the blockchain
Variants
BCS
Binary Canonical Serialization
Hex
Hex encoded e.g. 0xABCDE12345
Base64
Base 64 encoded
Implementations
sourceimpl EncodingType
impl EncodingType
sourcepub fn encode_key<Key: ValidCryptoMaterial>(
&self,
name: &'static str,
key: &Key
) -> CliTypedResult<Vec<u8>>
pub fn encode_key<Key: ValidCryptoMaterial>(
&self,
name: &'static str,
key: &Key
) -> CliTypedResult<Vec<u8>>
Encodes Key into one of the EncodingTypes
sourcepub fn load_key<Key: ValidCryptoMaterial>(
&self,
name: &'static str,
path: &Path
) -> CliTypedResult<Key>
pub fn load_key<Key: ValidCryptoMaterial>(
&self,
name: &'static str,
path: &Path
) -> CliTypedResult<Key>
Loads a key from a file
sourcepub fn decode_key<Key: ValidCryptoMaterial>(
&self,
name: &'static str,
data: Vec<u8>
) -> CliTypedResult<Key>
pub fn decode_key<Key: ValidCryptoMaterial>(
&self,
name: &'static str,
data: Vec<u8>
) -> CliTypedResult<Key>
Decodes an encoded key given the known encoding
Trait Implementations
sourceimpl Clone for EncodingType
impl Clone for EncodingType
sourcefn clone(&self) -> EncodingType
fn clone(&self) -> EncodingType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for EncodingType
impl Debug for EncodingType
sourceimpl Default for EncodingType
impl Default for EncodingType
sourceimpl Display for EncodingType
impl Display for EncodingType
sourceimpl FromStr for EncodingType
impl FromStr for EncodingType
sourceimpl ValueEnum for EncodingType
impl ValueEnum for EncodingType
sourcefn value_variants<'a>() -> &'a [Self]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
fn value_variants<'a>() -> &'a [Self]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
All possible argument values, in display order.
sourcefn to_possible_value<'a>(&self) -> Option<PossibleValue<'a>>
fn to_possible_value<'a>(&self) -> Option<PossibleValue<'a>>
The canonical argument value. Read more
impl Copy for EncodingType
Auto Trait Implementations
impl RefUnwindSafe for EncodingType
impl Send for EncodingType
impl Sync for EncodingType
impl Unpin for EncodingType
impl UnwindSafe for EncodingType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more