pub enum Error {
Show 15 variants
Io {
source: Error,
path: PathBuf,
},
FileNotFound {
path: PathBuf,
source: Error,
},
Ioctl {
fd: RawFd,
code: Error,
api: c_ulong,
},
NotSupportedIoctl {
fd: RawFd,
code: c_int,
api: c_ulong,
},
DeviceIsBusy {
fd: RawFd,
code: c_int,
api: c_ulong,
},
RequestIsAlreadyQueued {
fd: RawFd,
code: c_int,
api: c_ulong,
},
RequestNotContainBuffers {
fd: RawFd,
code: c_int,
api: c_ulong,
},
OutOfMemory {
fd: RawFd,
code: c_int,
api: c_ulong,
},
RequestHasInvalidData {
fd: RawFd,
code: c_int,
api: c_ulong,
},
HardwareBadState {
fd: RawFd,
code: c_int,
api: c_ulong,
},
InterfaceTypeParseError {
from: u32,
},
EntityFunctionsParseError {
from: u32,
},
EntityFlagsParseError {
from: u32,
},
PadFlagsParseError {
from: u32,
},
LinkFlagsParseError {
from: u32,
},
}
Variants§
Io
Generic io error
FileNotFound
File not found
Ioctl
Generic ioctl error
code
is constructed from std::io::Error::from_raw_os_error
.
NotSupportedIoctl
The ioctl is not supported by the file descriptor.
DeviceIsBusy
The ioctl can’t be handled because the device is busy. This is typically return while device is streaming, and an ioctl tried to change something that would affect the stream, or would require the usage of a hardware resource that was already allocated. The ioctl must not be retried without performing another action to fix the problem first (typically: stop the stream before retrying).
RequestIsAlreadyQueued
The request was already queued or the application queued the first buffer directly, but later attempted to use a request.
RequestNotContainBuffers
The request did not contain any buffers. All requests are required to have at least one buffer. This can also be returned if some required configuration is missing in the request.
OutOfMemory
Out of memory when allocating internal data structures for a request.
RequestHasInvalidData
Request has invalid data
HardwareBadState
The hardware is in a bad state. To recover, the application needs to stop streaming to reset the hardware state and then try to restart streaming.
InterfaceTypeParseError
parse error as crate::MediaInterfaceType
EntityFunctionsParseError
parse error as crate::MediaEntityFunctions
EntityFlagsParseError
parse error as crate::MediaEntityFlags
PadFlagsParseError
parse error as crate::MediaPadFlags
LinkFlagsParseError
parse error as crate::MediaLinkFlags
Implementations§
Source§impl Error
impl Error
Sourcepub fn ioctl_error<F>(fd: F, code: c_int, api: c_ulong) -> Errorwhere
F: AsRawFd,
pub fn ioctl_error<F>(fd: F, code: c_int, api: c_ulong) -> Errorwhere
F: AsRawFd,
Constructs an Error from an ioctl failure
§Arguments
fd
: The file descriptor on which the ioctl error occurred.code
: The return code from the ioctl call.api
: The kind of operation that resulted in the error.
§References
https://www.kernel.org/doc/html/v6.9/userspace-api/media/gen-errors.html