pub trait ItemHandlerInterface: RpcDevice {
// Required methods
fn get_item_slot_count(&self) -> Result<i32>
where i32: DeserializeOwned + 'static;
fn get_item_slot_limit(&self, slot: i32) -> Result<i32>
where i32: DeserializeOwned + 'static;
fn get_item_stack_in_slot<T>(&self, slot: i32) -> Result<T>
where T: DeserializeOwned + 'static;
}Expand description
An interface between item storage devices or blocks and the HLAPI.
Required Methods§
Sourcefn get_item_slot_count(&self) -> Result<i32>where
i32: DeserializeOwned + 'static,
fn get_item_slot_count(&self) -> Result<i32>where
i32: DeserializeOwned + 'static,
Returns a signed 32-bit integer that represents the slots in the storage block.
Sourcefn get_item_slot_limit(&self, slot: i32) -> Result<i32>where
i32: DeserializeOwned + 'static,
fn get_item_slot_limit(&self, slot: i32) -> Result<i32>where
i32: DeserializeOwned + 'static,
Returns a signed 32-bit integer that represents how many items can be stored in a single slot in the storage block.
Sourcefn get_item_stack_in_slot<T>(&self, slot: i32) -> Result<T>where
T: DeserializeOwned + 'static,
fn get_item_stack_in_slot<T>(&self, slot: i32) -> Result<T>where
T: DeserializeOwned + 'static,
Returns a type which can be deserialized from JSON which represents the current Minecraft IItemStack in the specified slot.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.