pub struct PowerPortTemplate {Show 13 fields
pub id: Option<i32>,
pub url: Option<String>,
pub display: Option<String>,
pub device_type: Option<Option<Box<BriefDeviceType>>>,
pub module_type: Option<Option<Box<BriefModuleType>>>,
pub name: String,
pub label: Option<String>,
pub type: Option<Option<Box<PowerPortType>>>,
pub maximum_draw: Option<Option<i32>>,
pub allocated_draw: Option<Option<i32>>,
pub description: Option<String>,
pub created: Option<Option<String>>,
pub last_updated: Option<Option<String>>,
}Expand description
PowerPortTemplate : Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
Fields§
§id: Option<i32>§url: Option<String>§display: Option<String>§device_type: Option<Option<Box<BriefDeviceType>>>§module_type: Option<Option<Box<BriefModuleType>>>§name: String{module} is accepted as a substitution for the module bay position when attached to a module type.
label: Option<String>Physical label
type: Option<Option<Box<PowerPortType>>>§maximum_draw: Option<Option<i32>>Maximum power draw (watts)
allocated_draw: Option<Option<i32>>Allocated power draw (watts)
description: Option<String>§created: Option<Option<String>>§last_updated: Option<Option<String>>Implementations§
Source§impl PowerPortTemplate
impl PowerPortTemplate
Sourcepub fn new(name: String) -> PowerPortTemplate
pub fn new(name: String) -> PowerPortTemplate
Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
Trait Implementations§
Source§impl Clone for PowerPortTemplate
impl Clone for PowerPortTemplate
Source§fn clone(&self) -> PowerPortTemplate
fn clone(&self) -> PowerPortTemplate
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 PowerPortTemplate
impl Debug for PowerPortTemplate
Source§impl Default for PowerPortTemplate
impl Default for PowerPortTemplate
Source§fn default() -> PowerPortTemplate
fn default() -> PowerPortTemplate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PowerPortTemplate
impl<'de> Deserialize<'de> for PowerPortTemplate
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 PowerPortTemplate
impl PartialEq for PowerPortTemplate
Source§impl Serialize for PowerPortTemplate
impl Serialize for PowerPortTemplate
impl StructuralPartialEq for PowerPortTemplate
Auto Trait Implementations§
impl Freeze for PowerPortTemplate
impl RefUnwindSafe for PowerPortTemplate
impl Send for PowerPortTemplate
impl Sync for PowerPortTemplate
impl Unpin for PowerPortTemplate
impl UnwindSafe for PowerPortTemplate
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