Skip to main content

GeometryError

Enum GeometryError 

Source
#[non_exhaustive]
pub enum GeometryError {
#[non_exhaustive]
SectorSizeUnsupported { bytes_per_sector: u32, },
#[non_exhaustive]
ClusterSizeUnsupported { bytes_per_cluster: u32, bytes_per_sector: u32, },
#[non_exhaustive]
ClusterTooLarge { bytes_per_cluster: u32, limit: u32, },
#[non_exhaustive]
BoundaryAlignUnsupported { bytes: u32, bytes_per_sector: u32, },
#[non_exhaustive]
VolumeTooSmall { sectors: u64, minimum: u64, },
#[non_exhaustive]
NoClusterHeap { heap_at: u64, volume_bytes: u64, },
#[non_exhaustive]
TooManyClusters { clusters: u64, limit: u32, },
#[non_exhaustive]
HeapTooSmall { clusters: u32, needed: u32, }, }
Expand description

A geometry that cannot be realized.

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.
§

#[non_exhaustive]
SectorSizeUnsupported

The sector size is not one the format defines.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§bytes_per_sector: u32

The size requested, in bytes.

§

#[non_exhaustive]
ClusterSizeUnsupported

The allocation unit is not a power of two, or is smaller than a sector.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§bytes_per_cluster: u32

The size requested, in bytes.

§bytes_per_sector: u32

The sector size it was requested against.

§

#[non_exhaustive]
ClusterTooLarge

The allocation unit exceeds what the format’s two shifts can express.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§bytes_per_cluster: u32

The size requested, in bytes.

§

#[non_exhaustive]
BoundaryAlignUnsupported

The alignment boundary is not a power of two, or is smaller than a sector.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§bytes: u32

The alignment requested, in bytes.

§bytes_per_sector: u32

The sector size it was requested against.

§

#[non_exhaustive]
VolumeTooSmall

The volume is too small to hold a filesystem at all.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§sectors: u64

Sectors the volume spans.

§

#[non_exhaustive]
NoClusterHeap

The regions ahead of the cluster heap leave no room for the heap.

Reached by an alignment large enough to push the heap past the end of the volume, and by a cluster small enough that its allocation table is most of the volume.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§heap_at: u64

Where the heap would have begun, in bytes from the volume’s start.

§volume_bytes: u64

Bytes the volume spans.

§

#[non_exhaustive]
TooManyClusters

The cluster is small enough that the volume holds more clusters than a 32-bit number addresses.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§clusters: u64

Clusters the heap would have held.

§

#[non_exhaustive]
HeapTooSmall

The heap is too small to hold the three residents a format writes: the allocation bitmap, the up-case table, and the root directory.

Fields

This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
§clusters: u32

Clusters the heap holds.

§needed: u32

Clusters the three residents need.

Trait Implementations§

Source§

impl Clone for GeometryError

Source§

fn clone(&self) -> GeometryError

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 GeometryError

Source§

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

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

impl Display for GeometryError

Source§

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

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

impl Error for GeometryError

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

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 From<GeometryError> for FormatError

Source§

fn from(source: GeometryError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for GeometryError

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for GeometryError

Source§

impl Eq for GeometryError

Source§

impl StructuralPartialEq for GeometryError

Auto Trait Implementations§

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<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> 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 = 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 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.