Struct capsules_extra::net::udp::udp_send::UDPSendStruct

source ·
pub struct UDPSendStruct<'a, T: IP6Sender<'a>> { /* private fields */ }
Expand description

This is a specific instantiation of the UDPSender trait. Note that this struct contains a reference to an IP6Sender which it forwards packets to (and receives callbacks from).

Implementations§

source§

impl<'a, T: IP6Sender<'a>> UDPSendStruct<'a, T>

source

pub fn new( udp_mux_sender: &'a MuxUdpSender<'a, T>, udp_vis: &'static UdpVisibilityCapability, ) -> UDPSendStruct<'a, T>

Trait Implementations§

source§

impl<'a, T: IP6Sender<'a>> ListNode<'a, UDPSendStruct<'a, T>> for UDPSendStruct<'a, T>

source§

fn next(&'a self) -> &'a ListLink<'a, UDPSendStruct<'a, T>>

source§

impl<'a, T: IP6Sender<'a>> UDPSender<'a> for UDPSendStruct<'a, T>

Below is the implementation of the UDPSender traits for the UDPSendStruct.

source§

fn set_client(&self, client: &'a dyn UDPSendClient)

This function sets the client for the UDPSender instance Read more
source§

fn send_to( &'a self, dest: IPAddr, dst_port: u16, buf: SubSliceMut<'static, u8>, net_cap: &'static NetworkCapability, ) -> Result<(), SubSliceMut<'static, u8>>

This function constructs a UDPHeader and sends the payload to the provided destination IP address and destination port from the src port contained in the UdpPortBindingTx. Read more
source§

fn driver_send_to( &'a self, dest: IPAddr, dst_port: u16, src_port: u16, buf: SubSliceMut<'static, u8>, _driver_send_cap: &dyn UdpDriverCapability, net_cap: &'static NetworkCapability, ) -> Result<(), SubSliceMut<'static, u8>>

This function is identical to send_to() except that it takes in an explicit src_port instead of a binding. This allows it to be used by the userspace driver, above which apps are bound to multiple ports Read more
source§

fn send( &'a self, dest: IPAddr, udp_header: UDPHeader, buf: SubSliceMut<'static, u8>, net_cap: &'static NetworkCapability, ) -> Result<(), SubSliceMut<'static, u8>>

This function constructs an IP packet from the completed UDPHeader and buffer, and sends it to the provided IP address Read more
source§

fn get_binding(&self) -> Option<UdpPortBindingTx>

source§

fn is_bound(&self) -> bool

source§

fn set_binding(&self, binding: UdpPortBindingTx) -> Option<UdpPortBindingTx>

Auto Trait Implementations§

§

impl<'a, T> !Freeze for UDPSendStruct<'a, T>

§

impl<'a, T> !RefUnwindSafe for UDPSendStruct<'a, T>

§

impl<'a, T> !Send for UDPSendStruct<'a, T>

§

impl<'a, T> !Sync for UDPSendStruct<'a, T>

§

impl<'a, T> Unpin for UDPSendStruct<'a, T>

§

impl<'a, T> !UnwindSafe for UDPSendStruct<'a, T>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.