Enum cbm::disk::DiskError [−][src]
pub enum DiskError { Unknown, ReadOnly, InvalidLocation, InvalidOffset, InvalidHeader, InvalidBAM, InvalidLayout, InvalidRecord, ReadOverflow, ReadUnderrun, WriteUnderrun, Unformatted, NotFound, ChainLoop, InvalidChainLink, InvalidRelativeFile, Unpositioned, FilenameTooLong, FileExists, DiskFull, InvalidRecordIndex, UnknownFormat, GEOSInfoNotFound, RecordTooLarge, NonLinearFile, }
Errors that can be returned from disk image operations. These are
generally converted into io::Error
.
Variants
Unknown
Unknown error
ReadOnly
Write access attempted to read-only media
InvalidLocation
Bad track or sector
InvalidOffset
Offset out of bounds
InvalidHeader
Invalid header
InvalidBAM
Invalid BAM
InvalidLayout
Invalid layout
InvalidRecord
Record out of bounds
ReadOverflow
Read overflow
ReadUnderrun
Read underrun
WriteUnderrun
Write underrun
Unformatted
Attempt to use unformatted media
NotFound
File not found
ChainLoop
Chain loop detected
InvalidChainLink
Invalid chain link
InvalidRelativeFile
Invalid relative file layout
Unpositioned
Attempt to write a resource with no embedded position
FilenameTooLong
Filename exceeds maximum length
FileExists
A file with the specified filename already exists
DiskFull
Disk is full
InvalidRecordIndex
Invalid record index
UnknownFormat
Unknown format
GEOSInfoNotFound
A required GEOS info block was not found.
RecordTooLarge
A record exceeded the maximum size.
NonLinearFile
Attempt to linearly access non-linear file.
Methods
impl DiskError
[src]
impl DiskError
pub fn from_io_error(error: &Error) -> Option<DiskError>
[src]
pub fn from_io_error(error: &Error) -> Option<DiskError>
If the provided io::Error
contains a DiskError
, return the
underlying DiskError
. If not, return None.
pub fn to_io_error(&self) -> Error
[src]
pub fn to_io_error(&self) -> Error
This is sometimes useful instead of .into() when the compiler doesn't have enough information to perform type inference. (Type ascription can't come soon enough.)
Trait Implementations
impl Clone for DiskError
[src]
impl Clone for DiskError
fn clone(&self) -> DiskError
[src]
fn clone(&self) -> DiskError
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for DiskError
[src]
impl Debug for DiskError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for DiskError
[src]
impl PartialEq for DiskError
fn eq(&self, other: &DiskError) -> bool
[src]
fn eq(&self, other: &DiskError) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Error for DiskError
[src]
impl Error for DiskError
fn description(&self) -> &str
[src]
fn description(&self) -> &str
Provide terse descriptions of the errors.
fn cause(&self) -> Option<&Error>
[src]
fn cause(&self) -> Option<&Error>
For errors which encapsulate another error, allow the caller to fetch the contained error.
impl Display for DiskError
[src]
impl Display for DiskError
impl Into<Error> for DiskError
[src]
impl Into<Error> for DiskError
impl From<Error> for DiskError
[src]
impl From<Error> for DiskError
impl PartialEq<Error> for DiskError
[src]
impl PartialEq<Error> for DiskError
fn eq(&self, other: &Error) -> bool
[src]
fn eq(&self, other: &Error) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl PartialEq<DiskError> for Error
[src]
impl PartialEq<DiskError> for Error