Struct drone_core::inventory::Guard [−][src]
#[must_use = "if unused the item will immediately teardown"]pub struct Guard<'a, T: Item> { /* fields omitted */ }
An RAII scoped guard for the inventory item T
. Will call
Item::teardown
on drop
.
Implementations
impl<T: Item> Guard<'_, T>
[src]
impl<T: Item> Guard<'_, T>
[src]pub fn inventory_token(&self) -> &Token<T>
[src]
Returns a reference to Token
<T>
. While the reference exists, the
item is always in its active state.