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