|
co_usb
|
RAII wrapper for an interface. More...
#include <interface.hpp>
Public Member Functions | |
| ~interface () noexcept(false) | |
| Releases the interface. | |
| interface (interface const &)=delete | |
| interface & | operator= (interface const &)=delete |
| interface (interface &&other) noexcept | |
| interface & | operator= (interface &&other) |
| auto | release (std::error_code &ec) noexcept -> void |
| Releases the interface. | |
| auto | devh () const noexcept -> libusb_device_handle * |
| auto | interface_num () const noexcept -> int |
| interface (detail::DeviceHandleSource auto const &devh_src, int interface_num) | |
RAII wrapper for an interface.
This type assumes the interface is already claimed at the point of construction. The destructor will attempt to release the interface and may throw if the release operation fails.
|
inline |
Releases the interface.
| std::system_error | if release fails. |
Use release to avoid throwing.
|
delete |
|
inlinenoexcept |
|
inlineexplicit |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Releases the interface.
Sets the error code if the release operation fails.