Struct cameleon::u3v::stream_handle::StreamParams
source · pub struct StreamParams {
pub leader_size: usize,
pub trailer_size: usize,
pub payload_size: usize,
pub payload_count: usize,
pub payload_final1_size: usize,
pub payload_final2_size: usize,
pub timeout: Duration,
}
Expand description
Parameters to receive stream packets.
Both StreamHandle
doesn’t check the integrity of the parameters. That’s up to user.
Fields§
§leader_size: usize
Maximum leader size.
trailer_size: usize
Maximum trailer size.
payload_size: usize
Payload transfer size.
payload_count: usize
Payload transfer count.
payload_final1_size: usize
Payload transfer final1 size.
payload_final2_size: usize
Payload transfer final2 size.
timeout: Duration
Timeout duration of each transaction between device.
Implementations§
source§impl StreamParams
impl StreamParams
sourcepub fn maximum_payload_size(&self) -> usize
pub fn maximum_payload_size(&self) -> usize
Return upper bound of payload size calculated by current StreamParams
values.
NOTE: Payload size may dynamically change according to settings of camera.
source§impl StreamParams
impl StreamParams
sourcepub fn new(
leader_size: usize,
trailer_size: usize,
payload_size: usize,
payload_count: usize,
payload_final1_size: usize,
payload_final2_size: usize,
timeout: Duration
) -> Self
pub fn new( leader_size: usize, trailer_size: usize, payload_size: usize, payload_count: usize, payload_final1_size: usize, payload_final2_size: usize, timeout: Duration ) -> Self
Construct StreamParams
.
sourcepub fn from_control<Ctrl: DeviceControl + ?Sized>(
ctrl: &mut Ctrl
) -> ControlResult<Self>
pub fn from_control<Ctrl: DeviceControl + ?Sized>( ctrl: &mut Ctrl ) -> ControlResult<Self>
Build StreamParams
from DeviceControl
.
Trait Implementations§
source§impl Clone for StreamParams
impl Clone for StreamParams
source§fn clone(&self) -> StreamParams
fn clone(&self) -> StreamParams
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StreamParams
impl Debug for StreamParams
source§impl Default for StreamParams
impl Default for StreamParams
source§fn default() -> StreamParams
fn default() -> StreamParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for StreamParams
impl Send for StreamParams
impl Sync for StreamParams
impl Unpin for StreamParams
impl UnwindSafe for StreamParams
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