pub enum SortError {
Show 15 variants
Io(Error),
PermissionDenied {
file: String,
},
FileNotFound {
file: String,
},
IsDirectory {
file: String,
},
InvalidKeySpec {
spec: String,
},
InvalidFieldSeparator {
sep: String,
},
InvalidBufferSize {
size: String,
},
ConflictingOptions {
message: String,
},
OutOfMemory,
NotSorted {
line: usize,
},
MergeFailed {
message: String,
},
ThreadPoolError {
message: String,
},
Utf8Error(FromUtf8Error),
ParseError {
message: String,
},
Internal {
message: String,
},
}Expand description
Custom error type for sort operations
Variants§
Io(Error)
PermissionDenied
FileNotFound
IsDirectory
InvalidKeySpec
InvalidFieldSeparator
InvalidBufferSize
ConflictingOptions
OutOfMemory
NotSorted
MergeFailed
ThreadPoolError
Utf8Error(FromUtf8Error)
ParseError
Internal
Implementations§
Source§impl SortError
impl SortError
Sourcepub fn permission_denied(file: &str) -> Self
pub fn permission_denied(file: &str) -> Self
Create a permission denied error
Sourcepub fn file_not_found(file: &str) -> Self
pub fn file_not_found(file: &str) -> Self
Create a file not found error
Sourcepub fn is_directory(file: &str) -> Self
pub fn is_directory(file: &str) -> Self
Create an is directory error
Sourcepub fn invalid_key_spec(spec: &str) -> Self
pub fn invalid_key_spec(spec: &str) -> Self
Create an invalid key spec error
Sourcepub fn invalid_field_separator(sep: &str) -> Self
pub fn invalid_field_separator(sep: &str) -> Self
Create an invalid field separator error
Sourcepub fn invalid_buffer_size(size: &str) -> Self
pub fn invalid_buffer_size(size: &str) -> Self
Create an invalid buffer size error
Sourcepub fn conflicting_options(message: &str) -> Self
pub fn conflicting_options(message: &str) -> Self
Create a conflicting options error
Sourcepub fn not_sorted(line: usize) -> Self
pub fn not_sorted(line: usize) -> Self
Create a not sorted error
Sourcepub fn merge_failed(message: &str) -> Self
pub fn merge_failed(message: &str) -> Self
Create a merge failed error
Sourcepub fn thread_pool_error(message: &str) -> Self
pub fn thread_pool_error(message: &str) -> Self
Create a thread pool error
Sourcepub fn parse_error(message: &str) -> Self
pub fn parse_error(message: &str) -> Self
Create a parse error
Trait Implementations§
Source§impl Error for SortError
impl Error for SortError
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<FromUtf8Error> for SortError
impl From<FromUtf8Error> for SortError
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SortError
impl !RefUnwindSafe for SortError
impl Send for SortError
impl Sync for SortError
impl Unpin for SortError
impl !UnwindSafe for SortError
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more