pub fn try_decode(&self) -> Result<Vec<u8>> {
    match self {
      Self::PublicKeyMultibase(input) => decode_multibase(input).map_err(|_| Error::InvalidKeyDataMultibase),
      Self::PublicKeyBase58(input) => decode_b58(input).map_err(|_| Error::InvalidKeyDataBase58),
      Self::PublicKeyJwk(_) => Err(Error::InvalidKeyData),
    }
  }
/// Returns a `Vec<u8>` containing the decoded bytes of the `MethodData`.
///
/// This is generally a public key identified by a `MethodType` value.
///
/// # Errors
///
/// Decoding can fail if `MethodData` has invalid content or cannot be
/// represented as a vector of bytes.
Returns a `Vec` containing the decoded bytes of the `MethodData`.
This is generally a public key identified by a `MethodType` value.
Returns a ` Vec ` containing the decoded bytes of the ` MethodData ` . This is generally a public key identified by a ` MethodType ` value .
pub fn try_decode(&self) -> Result<Vec<u8>> {
    match self {
      Self::PublicKeyMultibase(input) => decode_multibase(input).map_err(|_| Error::InvalidKeyDataMultibase),
      Self::PublicKeyBase58(input) => decode_b58(input).map_err(|_| Error::InvalidKeyDataBase58),
      Self::PublicKeyJwk(_) => Err(Error::InvalidKeyData),
    }
  }
pub fn try_decode ( & self ) -> Result < Vec < u8 > > { match self { Self :: PublicKeyMultibase ( input ) => decode_multibase ( input ) . map_err ( | _ | Error :: InvalidKeyDataMultibase ) , Self :: PublicKeyBase58 ( input ) => decode_b58 ( input ) . map_err ( | _ | Error :: InvalidKeyDataBase58 ) , Self :: PublicKeyJwk ( _ ) => Err ( Error :: InvalidKeyData ) , } }
Returns a `Vec<u8>` containing the decoded bytes of the `MethodData`.
Returns a ` Vec<u8 > ` containing the decoded bytes of the ` MethodData ` .
&self
&self
errors
Decoding can fail if `MethodData` has invalid content or cannot be
represented as a vector of bytes.
Decoding can fail if ` MethodData ` has invalid content or cannot be represented as a vector of bytes .