FSError

Enum FSError 

Source
pub enum FSError {
Show 43 variants DeviceError(String), FormatError(&'static str), NoSuchVolume, TooManyOpenVolumes, TooManyOpenDirs, TooManyOpenFiles, BadHandle, NotFound, FileAlreadyOpen, DirAlreadyOpen, OpenedDirAsFile, OpenedFileAsDir, DeleteDirAsFile, VolumeStillInUse, VolumeAlreadyOpen, Unsupported, EndOfFile, BadCluster, ConversionError, NotEnoughSpace, AllocationError, UnterminatedFatChain, ReadOnly, FileAlreadyExists, BadBlockSize(u16), InvalidOffset, DiskFull, DirAlreadyExists, Deadlock, PermissionDenied, ConnectionRefused, ConnectionReset, ConnectionAborted, NotConnected, AddrInUse, AddrNotAvailable, BrokenPipe, InvalidInput, InvalidData, TimedOut, Interrupted, WriteZero, Other,
}

Variants§

§

DeviceError(String)

The underlying block device threw an error.

§

FormatError(&'static str)

The filesystem is badly formatted (or this code is buggy).

§

NoSuchVolume

The given VolumeIdx was bad,

§

TooManyOpenVolumes

Out of memory opening volumes

§

TooManyOpenDirs

Out of memory opening directories

§

TooManyOpenFiles

Out of memory opening files

§

BadHandle

Bad handle given

§

NotFound

That file or directory doesn’t exist

§

FileAlreadyOpen

You can’t open a file twice or delete an open file

§

DirAlreadyOpen

You can’t open a directory twice

§

OpenedDirAsFile

You can’t open a directory as a file

§

OpenedFileAsDir

You can’t open a file as a directory

§

DeleteDirAsFile

You can’t delete a directory as a file

§

VolumeStillInUse

You can’t close a volume with open files or directories

§

VolumeAlreadyOpen

You can’t open a volume twice

§

Unsupported

We can’t do that yet

§

EndOfFile

Tried to read beyond end of file

§

BadCluster

Found a bad cluster

§

ConversionError

Error while converting types

§

NotEnoughSpace

The device does not have enough space for the operation

§

AllocationError

Cluster was not properly allocated by the library

§

UnterminatedFatChain

Jumped to free space during FAT traversing

§

ReadOnly

Tried to open Read-Only file with write mode

§

FileAlreadyExists

Tried to create an existing file

§

BadBlockSize(u16)

Bad block size - only 512 byte blocks supported

§

InvalidOffset

Bad offset given when seeking

§

DiskFull

Disk is full

§

DirAlreadyExists

A directory with that name already exists

§

Deadlock

§

PermissionDenied

The operation lacked the necessary privileges to complete.

§

ConnectionRefused

The connection was refused by the remote server.

§

ConnectionReset

The connection was reset by the remote server.

§

ConnectionAborted

The connection was aborted (terminated) by the remote server.

§

NotConnected

The network operation failed because it was not connected yet.

§

AddrInUse

A socket address could not be bound because the address is already in use elsewhere.

§

AddrNotAvailable

A nonexistent interface was requested or the requested address was not local.

§

BrokenPipe

The operation failed because a pipe was closed.

§

InvalidInput

A parameter was incorrect.

§

InvalidData

Data not valid for the operation were encountered.

Unlike InvalidInput, this typically means that the operation parameters were valid, however the error was caused by malformed input data.

For example, a function that reads a file into a string will error with InvalidData if the file’s contents are not valid UTF-8.

§

TimedOut

The I/O operation’s timeout expired, causing it to be canceled.

§

Interrupted

This operation was interrupted.

Interrupted operations can typically be retried.

§

WriteZero

An attempted write could not write any data.

§

Other

Something else.

Trait Implementations§

Source§

impl Debug for FSError

Source§

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

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

impl Display for FSError

Source§

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

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

impl From<Error> for FSError

Available on non-target_os=none only.
Source§

fn from(value: Error) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorKind> for FSError

Available on non-target_os=none only.
Source§

fn from(value: ErrorKind) -> Self

Converts to this type from the input type.
Source§

impl From<ErrorKind> for FSError

Source§

fn from(value: ErrorKind) -> Self

Converts to this type from the input type.

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

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<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

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

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

Source§

fn vzip(self) -> V

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,