pub struct DeviceBayTemplate {
pub id: Option<i32>,
pub url: Option<String>,
pub display: Option<String>,
pub device_type: Box<BriefDeviceType>,
pub name: String,
pub label: Option<String>,
pub description: Option<String>,
pub created: Option<Option<String>>,
pub last_updated: Option<Option<String>>,
}Expand description
DeviceBayTemplate : 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: Box<BriefDeviceType>§name: String{module} is accepted as a substitution for the module bay position when attached to a module type.
label: Option<String>Physical label
description: Option<String>§created: Option<Option<String>>§last_updated: Option<Option<String>>Implementations§
Source§impl DeviceBayTemplate
impl DeviceBayTemplate
Sourcepub fn new(device_type: BriefDeviceType, name: String) -> DeviceBayTemplate
pub fn new(device_type: BriefDeviceType, name: String) -> DeviceBayTemplate
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 DeviceBayTemplate
impl Clone for DeviceBayTemplate
Source§fn clone(&self) -> DeviceBayTemplate
fn clone(&self) -> DeviceBayTemplate
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 DeviceBayTemplate
impl Debug for DeviceBayTemplate
Source§impl Default for DeviceBayTemplate
impl Default for DeviceBayTemplate
Source§fn default() -> DeviceBayTemplate
fn default() -> DeviceBayTemplate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeviceBayTemplate
impl<'de> Deserialize<'de> for DeviceBayTemplate
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 DeviceBayTemplate
impl PartialEq for DeviceBayTemplate
Source§impl Serialize for DeviceBayTemplate
impl Serialize for DeviceBayTemplate
impl StructuralPartialEq for DeviceBayTemplate
Auto Trait Implementations§
impl Freeze for DeviceBayTemplate
impl RefUnwindSafe for DeviceBayTemplate
impl Send for DeviceBayTemplate
impl Sync for DeviceBayTemplate
impl Unpin for DeviceBayTemplate
impl UnwindSafe for DeviceBayTemplate
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