pub struct InventoryItem {Show 24 fields
pub id: Option<i32>,
pub url: Option<String>,
pub display_url: Option<String>,
pub display: Option<String>,
pub device: Box<BriefDevice>,
pub parent: Option<Option<i32>>,
pub name: String,
pub label: Option<String>,
pub status: Option<Box<InventoryItemStatus>>,
pub role: Option<Option<Box<BriefInventoryItemRole>>>,
pub manufacturer: Option<Option<Box<BriefManufacturer>>>,
pub part_id: Option<String>,
pub serial: Option<String>,
pub asset_tag: Option<Option<String>>,
pub discovered: Option<bool>,
pub description: Option<String>,
pub component_type: Option<Option<String>>,
pub component_id: Option<Option<i64>>,
pub component: Option<Option<Value>>,
pub tags: Option<Vec<NestedTag>>,
pub custom_fields: Option<HashMap<String, Value>>,
pub created: Option<Option<String>>,
pub last_updated: Option<Option<String>>,
pub _depth: Option<i32>,
}Expand description
InventoryItem : Adds support for custom fields and tags.
Fields§
§id: Option<i32>§url: Option<String>§display_url: Option<String>§display: Option<String>§device: Box<BriefDevice>§parent: Option<Option<i32>>§name: String§label: Option<String>Physical label
status: Option<Box<InventoryItemStatus>>§role: Option<Option<Box<BriefInventoryItemRole>>>§manufacturer: Option<Option<Box<BriefManufacturer>>>§part_id: Option<String>Manufacturer-assigned part identifier
serial: Option<String>§asset_tag: Option<Option<String>>A unique tag used to identify this item
discovered: Option<bool>This item was automatically discovered
description: Option<String>§component_type: Option<Option<String>>§component_id: Option<Option<i64>>§component: Option<Option<Value>>§custom_fields: Option<HashMap<String, Value>>§created: Option<Option<String>>§last_updated: Option<Option<String>>§_depth: Option<i32>Implementations§
Source§impl InventoryItem
impl InventoryItem
Sourcepub fn new(device: BriefDevice, name: String) -> InventoryItem
pub fn new(device: BriefDevice, name: String) -> InventoryItem
Adds support for custom fields and tags.
Trait Implementations§
Source§impl Clone for InventoryItem
impl Clone for InventoryItem
Source§fn clone(&self) -> InventoryItem
fn clone(&self) -> InventoryItem
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 InventoryItem
impl Debug for InventoryItem
Source§impl Default for InventoryItem
impl Default for InventoryItem
Source§fn default() -> InventoryItem
fn default() -> InventoryItem
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InventoryItem
impl<'de> Deserialize<'de> for InventoryItem
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 InventoryItem
impl PartialEq for InventoryItem
Source§impl Serialize for InventoryItem
impl Serialize for InventoryItem
impl StructuralPartialEq for InventoryItem
Auto Trait Implementations§
impl Freeze for InventoryItem
impl RefUnwindSafe for InventoryItem
impl Send for InventoryItem
impl Sync for InventoryItem
impl Unpin for InventoryItem
impl UnwindSafe for InventoryItem
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