pub struct U3vStreamBuilder<'a, T: UsbTransfer + 'static> { /* private fields */ }Expand description
Builder for configuring and starting a U3V frame stream.
Mirrors the GigE StreamBuilder pattern but for USB3 Vision.
Reads image dimensions from the camera features (or accepts explicit
overrides) and opens the underlying USB bulk stream.
§Example
ⓘ
let mut camera = open_u3v_device(device)?;
let frames = U3vStreamBuilder::new(&mut camera)
.build()?;Implementations§
Source§impl<'a, T: UsbTransfer + 'static> U3vStreamBuilder<'a, T>
impl<'a, T: UsbTransfer + 'static> U3vStreamBuilder<'a, T>
Sourcepub fn new(camera: &'a mut Camera<U3vRegisterIo<T>>) -> Self
pub fn new(camera: &'a mut Camera<U3vRegisterIo<T>>) -> Self
Create a new builder bound to a camera.
Sourcepub fn payload_size(self, size: u64) -> Self
pub fn payload_size(self, size: u64) -> Self
Override the payload size (bytes per frame).
When not set, the builder computes it from Width, Height, and PixelFormat camera features.
Sourcepub fn build(self) -> Result<U3vFrameStream, GenicamError>
pub fn build(self) -> Result<U3vFrameStream, GenicamError>
Finalise the builder: configure SIRM, start streaming, return
an async U3vFrameStream.
Auto Trait Implementations§
impl<'a, T> Freeze for U3vStreamBuilder<'a, T>
impl<'a, T> !RefUnwindSafe for U3vStreamBuilder<'a, T>
impl<'a, T> Send for U3vStreamBuilder<'a, T>
impl<'a, T> !Sync for U3vStreamBuilder<'a, T>
impl<'a, T> Unpin for U3vStreamBuilder<'a, T>
impl<'a, T> UnsafeUnpin for U3vStreamBuilder<'a, T>
impl<'a, T> !UnwindSafe for U3vStreamBuilder<'a, T>
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