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

Construct a new context.

Errors

Returns ContextConstructionError if the context cannot be created.

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

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.