pub struct ContainerSlotChangedEvent {
pub window_id: u8,
pub backing: ContainerBacking,
pub slot_index: i16,
pub old: Slot,
pub new: Slot,
}Expand description
Fires AFTER a container slot has changed.
Non-cancellable. Fires during the Post stage, once per changed
slot. Only fires for WindowSlotKind::Container – not for craft
grid / inventory slots inside a container window.
Fields§
§window_id: u8Window ID of the container.
backing: ContainerBackingHow the container is backed.
slot_index: i16Protocol slot index that changed.
old: SlotSlot state before the change.
new: SlotSlot state after the change.
Trait Implementations§
Source§impl Clone for ContainerSlotChangedEvent
impl Clone for ContainerSlotChangedEvent
Source§fn clone(&self) -> ContainerSlotChangedEvent
fn clone(&self) -> ContainerSlotChangedEvent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContainerSlotChangedEvent
impl Debug for ContainerSlotChangedEvent
Source§impl Event for ContainerSlotChangedEvent
impl Event for ContainerSlotChangedEvent
Source§fn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Whether this event has been cancelled by a Validate handler.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Upcasts to
&mut dyn Any for mutable type-erased dispatch.Auto Trait Implementations§
impl Freeze for ContainerSlotChangedEvent
impl RefUnwindSafe for ContainerSlotChangedEvent
impl Send for ContainerSlotChangedEvent
impl Sync for ContainerSlotChangedEvent
impl Unpin for ContainerSlotChangedEvent
impl UnsafeUnpin for ContainerSlotChangedEvent
impl UnwindSafe for ContainerSlotChangedEvent
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