#[non_exhaustive]pub enum WindowError {
Os {
operation: &'static str,
source: Error,
},
OutOfBounds {
at: u64,
end: u64,
len: u64,
},
TooLarge {
wanted: usize,
span: usize,
},
}Expand description
What can go wrong when opening a window or moving it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Os
The operating system refused a reservation, a mapping or a file operation.
Fields
OutOfBounds
The requested range runs past the end of the file.
Fields
TooLarge
The request cannot be covered by one view, so this window cannot serve it at all.
This is a configuration error rather than a data error: the window was opened with a span smaller than the largest range it was going to be asked for.
wanted can be larger than the length that was requested, and the difference is not a
mistake. A view has to start on an alignment boundary, so a request that starts part of the
way into one needs the bytes before it mapped as well, and wanted is what the mapping has
to cover rather than what the caller asked to read.
Trait Implementations§
Source§impl Debug for WindowError
impl Debug for WindowError
Source§impl Display for WindowError
impl Display for WindowError
Source§impl Error for WindowError
impl Error for WindowError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()