Struct realsense_rust::context::Context [−][src]
pub struct Context { /* fields omitted */ }
Expand description
Type describing a RealSense context, used by the rest of the API.
Implementations
Creates a device hub from the context.
Errors
Returns CouldNotGetDeviceHubError
if the device hub cannot be created.
Get a list of devices that are already connected to the host.
Create a new device and add it to the context.
This adds a “device” at a particular file on the system to the RealSense context. Returns a handle to the device, or an error if this call fails.
Errors
Returns NulError
if the provided file path cannot be cleanly
represented as a CString
. This usually only occurs if you have null
characters in the path. Constructing a path using the utilties in Rust’s std::fs
are
expected to work.
Returns CouldNotAddDeviceError
if the device cannot be added.
Removes a playback device from the context, if it exists
This removes a “device” at a particular file on the system from the RealSense context. Returns nothing (null tuple) or an Error if the device cannot be removed.
Errors
Returns CouldNotRemoveDeviceError
if the device cannot be removed for any reason.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Context
impl UnwindSafe for Context