bitwarden_api_api/models/
field_type.rsuse serde::{Deserialize, Serialize};
use crate::models;
#[repr(i64)]
#[derive(
Clone,
Copy,
Debug,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde_repr::Serialize_repr,
serde_repr::Deserialize_repr,
)]
pub enum FieldType {
Text = 0,
Hidden = 1,
Boolean = 2,
Linked = 3,
}
impl std::fmt::Display for FieldType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Text => write!(f, "0"),
Self::Hidden => write!(f, "1"),
Self::Boolean => write!(f, "2"),
Self::Linked => write!(f, "3"),
}
}
}
impl Default for FieldType {
fn default() -> FieldType {
Self::Text
}
}