pub struct ModuleBayTemplate {
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 position: Option<String>,
pub description: Option<String>,
pub created: Option<Option<String>>,
pub last_updated: Option<Option<String>>,
}Expand description
ModuleBayTemplate : 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
position: Option<String>Identifier to reference when renaming installed components
description: Option<String>§created: Option<Option<String>>§last_updated: Option<Option<String>>Implementations§
Source§impl ModuleBayTemplate
impl ModuleBayTemplate
Sourcepub fn new(name: String) -> ModuleBayTemplate
pub fn new(name: String) -> ModuleBayTemplate
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 ModuleBayTemplate
impl Clone for ModuleBayTemplate
Source§fn clone(&self) -> ModuleBayTemplate
fn clone(&self) -> ModuleBayTemplate
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 ModuleBayTemplate
impl Debug for ModuleBayTemplate
Source§impl Default for ModuleBayTemplate
impl Default for ModuleBayTemplate
Source§fn default() -> ModuleBayTemplate
fn default() -> ModuleBayTemplate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModuleBayTemplate
impl<'de> Deserialize<'de> for ModuleBayTemplate
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 ModuleBayTemplate
impl PartialEq for ModuleBayTemplate
Source§impl Serialize for ModuleBayTemplate
impl Serialize for ModuleBayTemplate
impl StructuralPartialEq for ModuleBayTemplate
Auto Trait Implementations§
impl Freeze for ModuleBayTemplate
impl RefUnwindSafe for ModuleBayTemplate
impl Send for ModuleBayTemplate
impl Sync for ModuleBayTemplate
impl Unpin for ModuleBayTemplate
impl UnwindSafe for ModuleBayTemplate
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