pub trait InventoryOperationsInterface: RpcDevice {
// Required methods
fn move_item(&self, from: i32, into: i32, count: i32) -> Result<()>;
fn drop_item(&self, count: i32, side: Direction) -> Result<i32>;
fn drop_item_into(
&self,
into: i32,
count: i32,
side: Direction,
) -> Result<i32>;
fn take_item(&self, count: i32, side: Direction) -> Result<i32>;
fn take_item_from(
&self,
from: i32,
count: i32,
side: Direction,
) -> Result<i32>;
}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<()>
fn move_item(&self, from: i32, into: i32, count: i32) -> Result<()>
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>
fn drop_item(&self, count: i32, side: Direction) -> Result<i32>
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>
fn drop_item_into(&self, into: i32, count: i32, side: Direction) -> Result<i32>
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.
Object Safety§
This trait is not object safe.