pub struct ModuleType {Show 28 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 owner: Option<Option<Box<BriefOwner>>>,
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>>,
pub module_count: Option<i32>,
pub console_port_template_count: Option<i32>,
pub console_server_port_template_count: Option<i32>,
pub power_port_template_count: Option<i32>,
pub power_outlet_template_count: Option<i32>,
pub interface_template_count: Option<i32>,
pub front_port_template_count: Option<i32>,
pub rear_port_template_count: Option<i32>,
pub module_bay_template_count: Option<i32>,
}Expand description
ModuleType : Base serializer class for models inheriting from PrimaryModel.
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>>§owner: Option<Option<Box<BriefOwner>>>§comments: Option<String>§custom_fields: Option<HashMap<String, Value>>§created: Option<Option<String>>§last_updated: Option<Option<String>>§module_count: Option<i32>§console_port_template_count: Option<i32>§console_server_port_template_count: Option<i32>§power_port_template_count: Option<i32>§power_outlet_template_count: Option<i32>§interface_template_count: Option<i32>§front_port_template_count: Option<i32>§rear_port_template_count: Option<i32>§module_bay_template_count: Option<i32>Implementations§
Source§impl ModuleType
impl ModuleType
Sourcepub fn new(manufacturer: BriefManufacturer, model: String) -> ModuleType
pub fn new(manufacturer: BriefManufacturer, model: String) -> ModuleType
Base serializer class for models inheriting from PrimaryModel.
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 (const: unstable) · 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§fn eq(&self, other: &ModuleType) -> bool
fn eq(&self, other: &ModuleType) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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