pub enum ZpoolErrorKind {
Show 18 variants CmdNotFound, Io, PoolNotFound, DeviceNotFound, VdevReuse, InvalidTopology, ParseError, DeviceTooSmall, PermissionDenied, NoActiveScrubs, NoValidReplicas, UnknownRaidType, CannotAttach, NoSuchDevice, OnlyDevice, MismatchedReplicationLevel, InvalidCacheDevice, Other,
}
Expand description

This is a hack to allow doing Eq on errors because std::io::Error doesn’t implement PartialEq. Error descriptions are copied from ZpoolError. Might be out of date.

Variants§

§

CmdNotFound

zpool not found in path. Open3 specific error.

§

Io

Any other Io related error. Exists as a fallback. Presence of this error is a bug.

§

PoolNotFound

Trying to manipulate non-existent pool.

§

DeviceNotFound

At least one vdev points to incorrect location. If vdev type is File then it means file not found.

§

VdevReuse

Trying to create a new Zpool, but one or more vdevs already used in another pool.

§

InvalidTopology

Given topology failed validation.

§

ParseError

Failed to parse value. Ideally you never see it, if you see it - it’s a bug.

§

DeviceTooSmall

Device used in CreateZpoolRequest is smaller than 64M (or 128M on some platforms)

§

PermissionDenied

Permission denied to create zpool. This might happened because: a) you are not running it as root b) you are running it inside jail that isn’t allowed to operate zfs

§

NoActiveScrubs

Trying to pause/stop a scrub that either never started or has already completed

§

NoValidReplicas

Trying to take the only device offline.

§

UnknownRaidType

Couldn’t parse string to raid type.

§

CannotAttach

Cannot attach a device to device that is part of raidz. It can only be attached to mirrors and top-level disks.

§

NoSuchDevice

Operation on device that was not found in the pool.

§

OnlyDevice

Trying to detach a device from vdev without any valid replicas left.

§

MismatchedReplicationLevel

Trying to add vdev with wrong replication level to existing zpool with different replication level. For example: mirror to zpool.

§

InvalidCacheDevice

Cache device must be a disk or disk slice/partition.

§

Other

Don’t know (yet) how to categorize this error. If you see this error - open an issue.

Trait Implementations§

source§

impl Clone for ZpoolErrorKind

source§

fn clone(&self) -> ZpoolErrorKind

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for ZpoolErrorKind

source§

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

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

impl PartialEq<ZpoolErrorKind> for ZpoolErrorKind

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for ZpoolErrorKind

source§

impl StructuralEq for ZpoolErrorKind

source§

impl StructuralPartialEq for ZpoolErrorKind

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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> ToOwned for Twhere T: Clone,

§

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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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<T> SendSyncUnwindSafe for Twhere T: Send + Sync + UnwindSafe + ?Sized,