pub struct RedstoneDevice(/* private fields */);Expand description
A device that can interact with redstone in the world.
Trait Implementations§
Source§impl RedstoneInterface for RedstoneDevice
impl RedstoneInterface for RedstoneDevice
Source§fn 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].
Source§fn 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].
Source§fn 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]
Auto Trait Implementations§
impl Freeze for RedstoneDevice
impl !RefUnwindSafe for RedstoneDevice
impl !Send for RedstoneDevice
impl !Sync for RedstoneDevice
impl Unpin for RedstoneDevice
impl !UnwindSafe for RedstoneDevice
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