pub fn from_usize(value: usize) -> OckamResult<Self> {
        match value {
            0 => Ok(SecretPersistence::Ephemeral),
            1 => Ok(SecretPersistence::Persistent),
            _ => Err(Error::UnknownSecretPersistenceValue.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(SecretPersistence::Ephemeral),
            1 => Ok(SecretPersistence::Persistent),
            _ => Err(Error::UnknownSecretPersistenceValue.into()),
        }
    }
pub fn from_usize ( value : usize ) -> OckamResult < Self > { match value { 0 => Ok ( SecretPersistence :: Ephemeral ) , 1 => Ok ( SecretPersistence :: Persistent ) , _ => Err ( Error :: UnknownSecretPersistenceValue . 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