pub struct StreamBuilder<'a> { /* private fields */ }Expand description
Builder for configuring a GVSP stream.
Implementations§
Source§impl<'a> StreamBuilder<'a>
impl<'a> StreamBuilder<'a>
Sourcepub fn new(device: &'a mut GigeDevice) -> Self
pub fn new(device: &'a mut GigeDevice) -> Self
Create a new builder bound to an opened GigeDevice.
Sourcepub fn dest(self, dest: StreamDest) -> Self
pub fn dest(self, dest: StreamDest) -> Self
Configure the stream destination.
Sourcepub fn auto_packet_size(self, enable: bool) -> Self
pub fn auto_packet_size(self, enable: bool) -> Self
Enable or disable automatic packet-size negotiation.
Sourcepub fn target_mtu(self, mtu: u32) -> Self
pub fn target_mtu(self, mtu: u32) -> Self
Target MTU used when computing the optimal GVSP packet size.
Sourcepub fn packet_size(self, size: u32) -> Self
pub fn packet_size(self, size: u32) -> Self
Override the GVSP packet size when automatic negotiation is disabled.
Sourcepub fn packet_delay(self, delay: u32) -> Self
pub fn packet_delay(self, delay: u32) -> Self
Override the GVSP packet delay when automatic negotiation is disabled.
Sourcepub fn destination_port(self, port: u16) -> Self
pub fn destination_port(self, port: u16) -> Self
Configure the UDP port used for streaming (defaults to 0 => device chosen).
Sourcepub fn multicast(self, group: Option<Ipv4Addr>) -> Self
pub fn multicast(self, group: Option<Ipv4Addr>) -> Self
Configure multicast reception when the device is set to multicast mode.
Sourcepub fn rcvbuf_bytes(self, size: usize) -> Self
pub fn rcvbuf_bytes(self, size: usize) -> Self
Custom receive buffer size for the UDP socket.
Trait Implementations§
Source§impl<'a> From<&'a mut GigeDevice> for StreamBuilder<'a>
impl<'a> From<&'a mut GigeDevice> for StreamBuilder<'a>
Source§fn from(device: &'a mut GigeDevice) -> Self
fn from(device: &'a mut GigeDevice) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for StreamBuilder<'a>
impl<'a> RefUnwindSafe for StreamBuilder<'a>
impl<'a> Send for StreamBuilder<'a>
impl<'a> Sync for StreamBuilder<'a>
impl<'a> Unpin for StreamBuilder<'a>
impl<'a> !UnwindSafe for StreamBuilder<'a>
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