Skip to main content

Crate vmb_core

Crate vmb_core 

Source
Expand description

Runtime-agnostic domain types and ports for vmb-rs.

This crate contains:

  • VmbError + Result — the error type of every port method and every domain operation.
  • Frame + PixelFormat — the safe, borrowed view of a received frame handed to user callbacks.
  • CameraInfo + DiscoveryEvent — domain value types.
  • Opaque handle newtypes (CameraHandle, FrameSlotId, etc.) — identifiers the domain uses to refer to adapter-owned resources without leaking FFI pointer types.
  • FrameCallback — the erased user closure struct delivered via a per-camera registry.

vmb-core has no unsafe blocks and no dependency on vmb-sys. The companion vmb-ffi crate hosts the adapter that links against libVmbC; vmb-fake hosts a pure-Rust adapter used for unit tests.

Re-exports§

pub use callback::FrameCallback;
pub use camera::Camera;
pub use discovery::register_camera_discovery;
pub use discovery::DiscoveryRegistration;
pub use error::check;
pub use error::error_name;
pub use error::VmbError;
pub use frame::Frame;
pub use frame::PixelFormat;
pub use port::DiscoveryCallback;
pub use port::VmbRuntime;
pub use system::VmbSystem;
pub use types::CameraHandle;
pub use types::CameraInfo;
pub use types::DiscoveryCallbackId;
pub use types::DiscoveryEvent;
pub use types::DiscoveryRegistrationHandle;
pub use types::FrameCallbackId;
pub use types::FrameSlotId;

Modules§

callback
User frame-callback wrapper.
camera
Safe wrapper around an opened Vimba X camera.
discovery
Vimba camera discovery events (plug / unplug / reachability).
error
Error type shared by the vmb-rs domain and every VmbRuntime adapter.
frame
Safe view over a Vimba X frame.
port
The VmbRuntime port and the callback wrappers the domain hands to adapters.
system
RAII owner for the Vimba X runtime lifecycle.
types
Opaque handle newtypes and plain-data value objects.

Type Aliases§

Result
Convenience alias: Result<T, VmbError>.