pub trait InventoryOperationsInterface: RpcDevice {
// Required methods
fn move_item(&self, from: i32, into: i32, count: i32) -> Result<()>
where (): DeserializeOwned + 'static;
fn drop_item(&self, 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;
fn take_item(&self, 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;
}Expand description
An interface between devices which carry out robot inventory operations and the HLAPI
Required Methods§
sourcefn 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.
sourcefn 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
sourcefn 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.
sourcefn 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.
sourcefn 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.