pub fn from_usize(value: usize) -> OckamResult<Self> {
        match value {
            0 => Ok(SecretType::Buffer),
            1 => Ok(SecretType::Aes),
            2 => Ok(SecretType::Curve25519),
            3 => Ok(SecretType::P256),
            _ => Err(Error::UnknownSecretTypeValue.into()),
        }
    }
/// Try to convert from a number to the rust enum
Try to convert from a number to the rust enum
Try to convert from a number to the rust enum
pub fn from_usize(value: usize) -> OckamResult<Self> {
        match value {
            0 => Ok(SecretType::Buffer),
            1 => Ok(SecretType::Aes),
            2 => Ok(SecretType::Curve25519),
            3 => Ok(SecretType::P256),
            _ => Err(Error::UnknownSecretTypeValue.into()),
        }
    }
pub fn from_usize ( value : usize ) -> OckamResult < Self > { match value { 0 => Ok ( SecretType :: Buffer ) , 1 => Ok ( SecretType :: Aes ) , 2 => Ok ( SecretType :: Curve25519 ) , 3 => Ok ( SecretType :: P256 ) , _ => Err ( Error :: UnknownSecretTypeValue . into ( ) ) , } }
Try to convert from a number to the rust enum
Try to convert from a number to the rust enum
value
usize
value
usize