Struct oc2_hlapi::device::InventoryOperationsModule
source · pub struct InventoryOperationsModule(/* private fields */);Expand description
A module that allows interaction with inventories in the the world.
Trait Implementations§
source§impl InventoryOperationsInterface for InventoryOperationsModule
impl InventoryOperationsInterface for InventoryOperationsModule
source§fn move_item(&self, from: i32, into: i32, count: i32) -> Result<()>where
(): DeserializeOwned + 'static,
fn move_item(&self, from: i32, into: i32, count: i32) -> Result<()>where
(): DeserializeOwned + 'static,
Attempts to move the given number of items from one robot inventory slot into another
slot.
source§fn drop_item(&self, count: i32, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
fn drop_item(&self, count: i32, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
Attempts to drop the given number of items in the currently active slot into either the
world or an adjacent inventory on the given side. Returns the amount of items dropped
source§fn drop_item_into(&self, into: i32, count: i32, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
fn drop_item_into(&self, into: i32, count: i32, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
Attempts to drop the given number of items in the currently active slot into the given
slot in the adjacent inventory in the given direction. Returns the amount of items
dropped.
source§fn take_item(&self, count: i32, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
fn take_item(&self, count: i32, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
Attempts to take the given number of items from either the world or an adjacent inventory
on the given side. Returns the amount of items taken.
source§fn take_item_from(&self, from: i32, count: i32, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
fn take_item_from(&self, from: i32, count: i32, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
Attempts to take the given number of items from the given slot in the adjacent inventory
in the given direction. Returns the amount of items taken.
Auto Trait Implementations§
impl Freeze for InventoryOperationsModule
impl !RefUnwindSafe for InventoryOperationsModule
impl !Send for InventoryOperationsModule
impl !Sync for InventoryOperationsModule
impl Unpin for InventoryOperationsModule
impl !UnwindSafe for InventoryOperationsModule
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