pub trait RedstoneInterface: RpcDevice {
// Required methods
fn get_redstone_input(&self, side: Direction) -> Result<i32>
where i32: DeserializeOwned + 'static;
fn get_redstone_output(&self, side: Direction) -> Result<i32>
where i32: DeserializeOwned + 'static;
fn set_redstone_output(&self, side: Direction, val: i32) -> Result<()>
where (): DeserializeOwned + 'static;
}Expand description
An interface between redstone signal sending and receiving devices and the HLAPI
Required Methods§
Sourcefn get_redstone_input(&self, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
fn get_redstone_input(&self, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
Returns a signed 32-bit integer that represents the strength of the redstone input on the provided side. The integer will be in the range [0, 15].
Sourcefn get_redstone_output(&self, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
fn get_redstone_output(&self, side: Direction) -> Result<i32>where
i32: DeserializeOwned + 'static,
Returns a signed 32-bit integer that represents the strength of the redstone output on the provided side. The integer will be in the range [0, 15].
Sourcefn set_redstone_output(&self, side: Direction, val: i32) -> Result<()>where
(): DeserializeOwned + 'static,
fn set_redstone_output(&self, side: Direction, val: i32) -> Result<()>where
(): DeserializeOwned + 'static,
Sets the redstone output strength on the given side to the provided value. Valid values for redstone strength are in the range [0, 15]
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.