pub struct VmbSystem<R: VmbRuntime> { /* private fields */ }Expand description
Owns the Vimba X runtime lifecycle.
On construction, calls VmbRuntime::startup; on drop, calls
VmbRuntime::shutdown.
Implementations§
Source§impl<R: VmbRuntime> VmbSystem<R>
impl<R: VmbRuntime> VmbSystem<R>
Sourcepub fn startup(runtime: R) -> Result<Self>
pub fn startup(runtime: R) -> Result<Self>
Start the Vimba runtime with the given backend.
Returns crate::VmbError::AlreadyStarted if another
VmbSystem built on the same process-global runtime is still
alive (applies to VmbFfiRuntime — fakes are per-instance).
Sourcepub fn runtime(&self) -> &R
pub fn runtime(&self) -> &R
Borrow the underlying runtime. Rarely needed by user code — most
operations are exposed directly on VmbSystem, Camera, or
DiscoveryRegistration.
Sourcepub fn list_cameras(&self) -> Result<Vec<CameraInfo>>
pub fn list_cameras(&self) -> Result<Vec<CameraInfo>>
Enumerate currently-visible cameras.
Sourcepub fn open_camera(&self, id: &str) -> Result<Camera<R>>
pub fn open_camera(&self, id: &str) -> Result<Camera<R>>
Open a camera by its transport-layer ID.
Sourcepub fn register_discovery<F>(
&self,
callback: F,
) -> Result<DiscoveryRegistration<R>>
pub fn register_discovery<F>( &self, callback: F, ) -> Result<DiscoveryRegistration<R>>
Register a camera-discovery subscription; the callback is invoked for every plug / unplug / reachability event the runtime surfaces.
Trait Implementations§
Source§impl<R: VmbRuntime> Debug for VmbSystem<R>
impl<R: VmbRuntime> Debug for VmbSystem<R>
Auto Trait Implementations§
impl<R> Freeze for VmbSystem<R>
impl<R> RefUnwindSafe for VmbSystem<R>where
R: RefUnwindSafe,
impl<R> Send for VmbSystem<R>
impl<R> Sync for VmbSystem<R>
impl<R> Unpin for VmbSystem<R>
impl<R> UnsafeUnpin for VmbSystem<R>
impl<R> UnwindSafe for VmbSystem<R>where
R: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more