pub struct InventoryItemTemplate {Show 17 fields
pub id: Option<i32>,
pub url: Option<String>,
pub display: Option<String>,
pub device_type: Box<BriefDeviceType>,
pub parent: Option<Option<i32>>,
pub name: String,
pub label: Option<String>,
pub role: Option<Option<Box<BriefInventoryItemRole>>>,
pub manufacturer: Option<Option<Box<BriefManufacturer>>>,
pub part_id: Option<String>,
pub description: Option<String>,
pub component_type: Option<Option<String>>,
pub component_id: Option<Option<i64>>,
pub component: Option<Option<Value>>,
pub created: Option<Option<String>>,
pub last_updated: Option<Option<String>>,
pub _depth: Option<i32>,
}Expand description
InventoryItemTemplate : 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: Box<BriefDeviceType>§parent: Option<Option<i32>>§name: String{module} is accepted as a substitution for the module bay position when attached to a module type.
label: Option<String>Physical label
role: Option<Option<Box<BriefInventoryItemRole>>>§manufacturer: Option<Option<Box<BriefManufacturer>>>§part_id: Option<String>Manufacturer-assigned part identifier
description: Option<String>§component_type: Option<Option<String>>§component_id: Option<Option<i64>>§component: Option<Option<Value>>§created: Option<Option<String>>§last_updated: Option<Option<String>>§_depth: Option<i32>Implementations§
Source§impl InventoryItemTemplate
impl InventoryItemTemplate
Sourcepub fn new(device_type: BriefDeviceType, name: String) -> InventoryItemTemplate
pub fn new(device_type: BriefDeviceType, name: String) -> InventoryItemTemplate
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 InventoryItemTemplate
impl Clone for InventoryItemTemplate
Source§fn clone(&self) -> InventoryItemTemplate
fn clone(&self) -> InventoryItemTemplate
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 InventoryItemTemplate
impl Debug for InventoryItemTemplate
Source§impl Default for InventoryItemTemplate
impl Default for InventoryItemTemplate
Source§fn default() -> InventoryItemTemplate
fn default() -> InventoryItemTemplate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InventoryItemTemplate
impl<'de> Deserialize<'de> for InventoryItemTemplate
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 InventoryItemTemplate
impl PartialEq for InventoryItemTemplate
Source§impl Serialize for InventoryItemTemplate
impl Serialize for InventoryItemTemplate
impl StructuralPartialEq for InventoryItemTemplate
Auto Trait Implementations§
impl Freeze for InventoryItemTemplate
impl RefUnwindSafe for InventoryItemTemplate
impl Send for InventoryItemTemplate
impl Sync for InventoryItemTemplate
impl Unpin for InventoryItemTemplate
impl UnwindSafe for InventoryItemTemplate
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