pub struct WritableFrontPortTemplateRequest {
pub device_type: Option<Option<Box<ConsolePortTemplateRequestDeviceType>>>,
pub module_type: Option<Option<Box<ConsolePortTemplateRequestModuleType>>>,
pub name: String,
pub label: Option<String>,
pub type: RHashType,
pub color: Option<String>,
pub rear_port: Box<FrontPortTemplateRequestRearPort>,
pub rear_port_position: Option<i32>,
pub description: Option<String>,
}Expand description
WritableFrontPortTemplateRequest : 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§
§device_type: Option<Option<Box<ConsolePortTemplateRequestDeviceType>>>§module_type: Option<Option<Box<ConsolePortTemplateRequestModuleType>>>§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: RHashType8p8c- 8P8C *8p6c- 8P6C *8p4c- 8P4C *8p2c- 8P2C *6p6c- 6P6C *6p4c- 6P4C *6p2c- 6P2C *4p4c- 4P4C *4p2c- 4P2C *gg45- GG45 *tera-4p- TERA 4P *tera-2p- TERA 2P *tera-1p- TERA 1P *110-punch- 110 Punch *bnc- BNC *f- F Connector *n- N Connector *mrj21- MRJ21 *fc- FC *fc-pc- FC/PC *fc-upc- FC/UPC *fc-apc- FC/APC *lc- LC *lc-pc- LC/PC *lc-upc- LC/UPC *lc-apc- LC/APC *lsh- LSH *lsh-pc- LSH/PC *lsh-upc- LSH/UPC *lsh-apc- LSH/APC *lx5- LX.5 *lx5-pc- LX.5/PC *lx5-upc- LX.5/UPC *lx5-apc- LX.5/APC *mpo- MPO *mtrj- MTRJ *sc- SC *sc-pc- SC/PC *sc-upc- SC/UPC *sc-apc- SC/APC *st- ST *cs- CS *sn- SN *sma-905- SMA 905 *sma-906- SMA 906 *urm-p2- URM-P2 *urm-p4- URM-P4 *urm-p8- URM-P8 *splice- Splice *usb-a- USB Type A *usb-b- USB Type B *usb-c- USB Type C *usb-mini-a- USB Mini A *usb-mini-b- USB Mini B *usb-micro-a- USB Micro A *usb-micro-b- USB Micro B *usb-micro-ab- USB Micro AB *other- Other
color: Option<String>§rear_port: Box<FrontPortTemplateRequestRearPort>§rear_port_position: Option<i32>§description: Option<String>Implementations§
Source§impl WritableFrontPortTemplateRequest
impl WritableFrontPortTemplateRequest
Sourcepub fn new(
name: String,
type: RHashType,
rear_port: FrontPortTemplateRequestRearPort,
) -> WritableFrontPortTemplateRequest
pub fn new( name: String, type: RHashType, rear_port: FrontPortTemplateRequestRearPort, ) -> WritableFrontPortTemplateRequest
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 WritableFrontPortTemplateRequest
impl Clone for WritableFrontPortTemplateRequest
Source§fn clone(&self) -> WritableFrontPortTemplateRequest
fn clone(&self) -> WritableFrontPortTemplateRequest
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 Default for WritableFrontPortTemplateRequest
impl Default for WritableFrontPortTemplateRequest
Source§fn default() -> WritableFrontPortTemplateRequest
fn default() -> WritableFrontPortTemplateRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for WritableFrontPortTemplateRequest
impl<'de> Deserialize<'de> for WritableFrontPortTemplateRequest
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 WritableFrontPortTemplateRequest
impl PartialEq for WritableFrontPortTemplateRequest
Source§fn eq(&self, other: &WritableFrontPortTemplateRequest) -> bool
fn eq(&self, other: &WritableFrontPortTemplateRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WritableFrontPortTemplateRequest
Auto Trait Implementations§
impl Freeze for WritableFrontPortTemplateRequest
impl RefUnwindSafe for WritableFrontPortTemplateRequest
impl Send for WritableFrontPortTemplateRequest
impl Sync for WritableFrontPortTemplateRequest
impl Unpin for WritableFrontPortTemplateRequest
impl UnwindSafe for WritableFrontPortTemplateRequest
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