Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 36 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, NotRideable(i32), EntityOutOfReach(i32), NotSeated(i32), NotRiding, Sign(SignError), Book(BookError), NotAsleep, NoBobber, AlreadyCast,
}
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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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.

§

NotRideable(i32)

The entity’s type carries no player (crate::Bot::mount).

§

EntityOutOfReach(i32)

The entity is farther than the interaction reach (3 blocks from the eyes to its box), or the crosshair could not be put on it.

§

NotSeated(i32)

The server did not seat the player on the entity after the right clicks (no saddle or harness, not tamed, the seats taken, a protected region).

§

NotRiding

The helper needs the player to ride something.

§

Sign(SignError)

The sign editor refused the lines (none open, more than four lines).

§

Book(BookError)

The book edit was refused (no book and quill in the hand, too many pages, a blank title).

§

NotAsleep

The player is not asleep (the server did not put it in the bed, or it is awake).

§

NoBobber

The bot has no fishing bobber out (none was cast, or it went away).

§

AlreadyCast

A fishing bobber is out already (reel it in first).

Trait Implementations§

Source§

impl Clone for Error

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Replaced by Error::source.
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for Error

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Forget for Error

§

impl Freeze for Error
where *const u8 is !null: Freeze, PhantomData<u8>: Freeze,

§

impl Move for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error
where RawVecInner: Send,

§

impl Sync for Error
where RawVecInner: Sync,

§

impl Unpin for Error
where *const u8 is !null: Unpin,

§

impl UnsafeUnpin for Error

§

impl UnwindSafe for Error
where RawVecInner: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V