#[non_exhaustive]pub enum GptError {
Io(Error),
Header(HeaderError),
CreatingInitializedDisk,
Overflow(&'static str),
NotEnoughSpace,
ReadOnly,
OverflowPartitionCount,
PartitionCountWouldChange,
PartitionIdAlreadyUsed,
}
Expand description
Errors returned when interacting with a Gpt Disk.
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.
Io(Error)
Generic IO Error
Header(HeaderError)
Error returned from writing or reading the header
CreatingInitializedDisk
we were expecting to read an existing partition table, but instead we’re attempting to create a new blank table
Overflow(&'static str)
Somthing Overflowed or Underflowed This will never occur when dealing with sane values
NotEnoughSpace
Unable to find enough space on drive
ReadOnly
disk not opened in writable mode
OverflowPartitionCount
If you try to create more partition than the header supports
PartitionCountWouldChange
The partition count changes but you did not allow that
PartitionIdAlreadyUsed
The id is already been used
Trait Implementations§
Source§impl Error for GptError
impl Error for GptError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<HeaderError> for GptError
impl From<HeaderError> for GptError
Source§fn from(e: HeaderError) -> Self
fn from(e: HeaderError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GptError
impl !RefUnwindSafe for GptError
impl Send for GptError
impl Sync for GptError
impl Unpin for GptError
impl !UnwindSafe for GptError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more