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