mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-02 18:12:51 +00:00
Rollup merge of #130789 - aviramha:add_inprogress, r=Noratrieb
add InProgress ErrorKind gated behind io_error_inprogress feature Follow up on https://github.com/rust-lang/libs-team/issues/92#issuecomment-2371666560
This commit is contained in:
commit
147aa8611a
@ -400,6 +400,11 @@ pub enum ErrorKind {
|
||||
#[stable(feature = "out_of_memory_error", since = "1.54.0")]
|
||||
OutOfMemory,
|
||||
|
||||
/// The operation was partially successful and needs to be checked
|
||||
/// later on due to not blocking.
|
||||
#[unstable(feature = "io_error_inprogress", issue = "none")]
|
||||
InProgress,
|
||||
|
||||
// "Unusual" error kinds which do not correspond simply to (sets
|
||||
// of) OS error codes, should be added just above this comment.
|
||||
// `Other` and `Uncategorized` should remain at the end:
|
||||
@ -449,6 +454,7 @@ impl ErrorKind {
|
||||
FilesystemQuotaExceeded => "filesystem quota exceeded",
|
||||
HostUnreachable => "host unreachable",
|
||||
Interrupted => "operation interrupted",
|
||||
InProgress => "in progress",
|
||||
InvalidData => "invalid data",
|
||||
InvalidFilename => "invalid filename",
|
||||
InvalidInput => "invalid input parameter",
|
||||
|
@ -348,6 +348,7 @@ fn kind_from_prim(ek: u32) -> Option<ErrorKind> {
|
||||
UnexpectedEof,
|
||||
Unsupported,
|
||||
OutOfMemory,
|
||||
InProgress,
|
||||
Uncategorized,
|
||||
})
|
||||
}
|
||||
|
@ -279,6 +279,7 @@ pub fn decode_error_kind(errno: i32) -> ErrorKind {
|
||||
libc::ETIMEDOUT => TimedOut,
|
||||
libc::ETXTBSY => ExecutableFileBusy,
|
||||
libc::EXDEV => CrossesDevices,
|
||||
libc::EINPROGRESS => InProgress,
|
||||
|
||||
libc::EACCES | libc::EPERM => PermissionDenied,
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user