pub struct InterfaceTemplate {Show 17 fields
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: Box<InterfaceType>,
pub enabled: Option<bool>,
pub mgmt_only: Option<bool>,
pub description: Option<String>,
pub bridge: Option<Option<Box<NestedInterfaceTemplate>>>,
pub poe_mode: Option<Option<Box<InterfaceTemplatePoeMode>>>,
pub poe_type: Option<Option<Box<InterfaceTemplatePoeType>>>,
pub rf_role: Option<Option<Box<InterfaceTemplateRfRole>>>,
pub created: Option<Option<String>>,
pub last_updated: Option<Option<String>>,
}Expand description
InterfaceTemplate : 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: Box<InterfaceType>§enabled: Option<bool>§mgmt_only: Option<bool>§description: Option<String>§bridge: Option<Option<Box<NestedInterfaceTemplate>>>§poe_mode: Option<Option<Box<InterfaceTemplatePoeMode>>>§poe_type: Option<Option<Box<InterfaceTemplatePoeType>>>§rf_role: Option<Option<Box<InterfaceTemplateRfRole>>>§created: Option<Option<String>>§last_updated: Option<Option<String>>Implementations§
Source§impl InterfaceTemplate
impl InterfaceTemplate
Sourcepub fn new(name: String, type: InterfaceType) -> InterfaceTemplate
pub fn new(name: String, type: InterfaceType) -> InterfaceTemplate
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 InterfaceTemplate
impl Clone for InterfaceTemplate
Source§fn clone(&self) -> InterfaceTemplate
fn clone(&self) -> InterfaceTemplate
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 InterfaceTemplate
impl Debug for InterfaceTemplate
Source§impl Default for InterfaceTemplate
impl Default for InterfaceTemplate
Source§fn default() -> InterfaceTemplate
fn default() -> InterfaceTemplate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InterfaceTemplate
impl<'de> Deserialize<'de> for InterfaceTemplate
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 InterfaceTemplate
impl PartialEq for InterfaceTemplate
Source§impl Serialize for InterfaceTemplate
impl Serialize for InterfaceTemplate
impl StructuralPartialEq for InterfaceTemplate
Auto Trait Implementations§
impl Freeze for InterfaceTemplate
impl RefUnwindSafe for InterfaceTemplate
impl Send for InterfaceTemplate
impl Sync for InterfaceTemplate
impl Unpin for InterfaceTemplate
impl UnwindSafe for InterfaceTemplate
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