#[non_exhaustive]pub enum ClickError {
Pending,
Resyncing,
NoScreen,
WindowOpen,
SameTick,
InvalidSlot,
InvalidButton,
Unpredictable,
}Expand description
Why a click (or open / close) was refused. Nothing was sent and nothing changed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Pending
The previous click’s confirm has not arrived yet (one click in flight).
Resyncing
The server rejected a click and its full window resync has not arrived yet.
NoScreen
Nothing is open: open the player inventory (Inventory::open_inventory) or wait for a
container window.
WindowOpen
A container window is open (the player inventory cannot be opened over it).
SameTick
Same-tick packet order vanilla never produces (and Grim’s PacketOrder checks flag): a second click this tick, a click / close in the tick the inventory was opened, or the other way round. Retry next tick.
InvalidSlot
The slot does not exist in the open screen (or OUTSIDE where not allowed).
InvalidButton
Invalid hotbar index for Click::Swap.
Unpredictable
The result depends on data ghast does not model (recipes, fuel, brewing, trading, enchanting, an unknown crafting result); sending it would desynchronise the inventory.
Trait Implementations§
Source§impl Clone for ClickError
impl Clone for ClickError
impl Copy for ClickError
Source§impl Debug for ClickError
impl Debug for ClickError
Source§impl Display for ClickError
impl Display for ClickError
impl Eq for ClickError
Source§impl Error for ClickError
impl Error for ClickError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()