#[non_exhaustive]pub enum Error {
Show 27 variants
Disconnected,
Timeout,
Teleported,
Died,
NotLoaded(BlockPos),
NothingToDig(BlockPos),
Unbreakable(BlockPos),
OutOfReach(BlockPos),
LostTarget(BlockPos),
Occupied(BlockPos),
NoSupport(BlockPos),
WouldActivate(BlockPos),
NotPlaced(BlockPos),
NothingHeld,
NoSuchItem(String),
UnknownItem(String),
UnknownBlock(String),
NoWindow,
Click(ClickError),
ClickRejected,
ClickTimedOut,
CannotUse,
Cancelled,
Panicked(String),
NoSuchEntity(i32),
NoPath,
Stuck,
}Expand description
Why a helper gave up. Nothing was left half-done: buttons are released and a window the helper opened is closed again.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Disconnected
The session ended (or the handle belongs to a session that ended).
Timeout
The helper did not finish within its time limit.
Teleported
The server teleported / set back the player while the helper was running.
Died
The player died while the helper was running.
NotLoaded(BlockPos)
The block’s chunk column is not loaded (never treated as air).
NothingToDig(BlockPos)
There is nothing to dig (air).
Unbreakable(BlockPos)
The block cannot be broken (bedrock, barriers, …).
OutOfReach(BlockPos)
No face of the block can be reached with an unobstructed crosshair (reach 4.5).
LostTarget(BlockPos)
The crosshair left the block while digging (something moved in between).
Occupied(BlockPos)
The block to place into is occupied (not air or a liquid), or the player stands in it.
NoSupport(BlockPos)
The block to place against is air.
WouldActivate(BlockPos)
The block placed against reacts to a right click (chest, door, …): placing would
activate it. Sneak first (set_controls with sneak) or pick another face.
NotPlaced(BlockPos)
The server did not put a block there (it refused the placement).
NothingHeld
Nothing in the hand.
NoSuchItem(String)
No stack matches.
UnknownItem(String)
An item name this version does not know.
UnknownBlock(String)
A block name this version does not know.
NoWindow
The helper needs an open container window.
Click(ClickError)
The inventory refused the click for good (not a retryable refusal).
ClickRejected
The server rejected the click (the inventory resyncs).
ClickTimedOut
No confirm arrived for the click.
CannotUse
The held item cannot be used now (not usable, full food bar, …).
Cancelled
The task was aborted or its session ended before it finished.
Panicked(String)
The task panicked.
NoSuchEntity(i32)
The entity is not tracked (gone, or ghast_client::Interests::ENTITIES is off).
NoPath
No path to the goal.
Stuck
The walker made no progress.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()