pub struct ModuleType {Show 18 fields
pub id: Option<i32>,
pub url: Option<String>,
pub display_url: Option<String>,
pub display: Option<String>,
pub profile: Option<Option<Box<BriefModuleTypeProfile>>>,
pub manufacturer: Box<BriefManufacturer>,
pub model: String,
pub part_number: Option<String>,
pub airflow: Option<Option<Box<ModuleTypeAirflow>>>,
pub weight: Option<Option<f64>>,
pub weight_unit: Option<Option<Box<DeviceTypeWeightUnit>>>,
pub description: Option<String>,
pub attributes: Option<Option<Value>>,
pub comments: Option<String>,
pub tags: Option<Vec<NestedTag>>,
pub custom_fields: Option<HashMap<String, Value>>,
pub created: Option<Option<String>>,
pub last_updated: Option<Option<String>>,
}Expand description
ModuleType : Adds support for custom fields and tags.
Fields§
§id: Option<i32>§url: Option<String>§display_url: Option<String>§display: Option<String>§profile: Option<Option<Box<BriefModuleTypeProfile>>>§manufacturer: Box<BriefManufacturer>§model: String§part_number: Option<String>Discrete part number (optional)
airflow: Option<Option<Box<ModuleTypeAirflow>>>§weight: Option<Option<f64>>§weight_unit: Option<Option<Box<DeviceTypeWeightUnit>>>§description: Option<String>§attributes: Option<Option<Value>>§comments: Option<String>§custom_fields: Option<HashMap<String, Value>>§created: Option<Option<String>>§last_updated: Option<Option<String>>Implementations§
Source§impl ModuleType
impl ModuleType
Sourcepub fn new(manufacturer: BriefManufacturer, model: String) -> ModuleType
pub fn new(manufacturer: BriefManufacturer, model: String) -> ModuleType
Adds support for custom fields and tags.
Trait Implementations§
Source§impl Clone for ModuleType
impl Clone for ModuleType
Source§fn clone(&self) -> ModuleType
fn clone(&self) -> ModuleType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModuleType
impl Debug for ModuleType
Source§impl Default for ModuleType
impl Default for ModuleType
Source§fn default() -> ModuleType
fn default() -> ModuleType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModuleType
impl<'de> Deserialize<'de> for ModuleType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ModuleType
impl PartialEq for ModuleType
Source§impl Serialize for ModuleType
impl Serialize for ModuleType
impl StructuralPartialEq for ModuleType
Auto Trait Implementations§
impl Freeze for ModuleType
impl RefUnwindSafe for ModuleType
impl Send for ModuleType
impl Sync for ModuleType
impl Unpin for ModuleType
impl UnwindSafe for ModuleType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more