Struct capsules_extra::net::ipv6::ipv6_send::IP6SendStruct

source ·
pub struct IP6SendStruct<'a, A: Alarm<'a>> { /* private fields */ }
Expand description

This struct is a specific implementation of the IP6Sender trait. This struct sends the packet using 6LoWPAN over a generic MacDevice object.

Implementations§

source§

impl<'a, A: Alarm<'a>> IP6SendStruct<'a, A>

source

pub fn new( ip6_packet: &'static mut IP6Packet<'static>, alarm: &'a A, tx_buf: &'static mut [u8], sixlowpan: TxState<'a>, radio: &'a dyn MacDevice<'a>, dst_mac_addr: MacAddress, src_mac_addr: MacAddress, ip_vis: &'static IpVisibilityCapability, ) -> IP6SendStruct<'a, A>

Trait Implementations§

source§

impl<'a, A: Alarm<'a>> AlarmClient for IP6SendStruct<'a, A>

source§

fn alarm(&self)

Callback indicating the alarm time has been reached. The alarm MUST be disabled when this is called. If a new alarm is needed, the client can call Alarm::set_alarm.
source§

impl<'a, A: Alarm<'a>> IP6Sender<'a> for IP6SendStruct<'a, A>

source§

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

This method sets the IP6SendClient for the IP6Sender instance, which receives the send_done callback when transmission has finished. Read more
source§

fn set_addr(&self, src_addr: IPAddr)

This method sets the source address for packets sent from the IP6Sender instance. Read more
source§

fn set_gateway(&self, gateway: MacAddress)

This method sets the gateway/next hop MAC address for this IP6Sender instance. Read more
source§

fn set_header(&mut self, ip6_header: IP6Header)

This method sets the IP6Header for the IP6Sender instance Read more
source§

fn send_to( &self, dst: IPAddr, transport_header: TransportHeader, payload: &SubSliceMut<'static, u8>, net_cap: &'static NetworkCapability, ) -> Result<(), ErrorCode>

This method sends the provided transport header and payload to the given destination IP address Read more
source§

impl<'a, A: Alarm<'a>> TxClient for IP6SendStruct<'a, A>

source§

fn send_done( &self, tx_buf: &'static mut [u8], acked: bool, result: Result<(), ErrorCode>, )

When transmission is complete or fails, return the buffer used for transmission to the client. result indicates whether or not the transmission was successful. Read more

Auto Trait Implementations§

§

impl<'a, A> !Freeze for IP6SendStruct<'a, A>

§

impl<'a, A> !RefUnwindSafe for IP6SendStruct<'a, A>

§

impl<'a, A> !Send for IP6SendStruct<'a, A>

§

impl<'a, A> !Sync for IP6SendStruct<'a, A>

§

impl<'a, A> Unpin for IP6SendStruct<'a, A>

§

impl<'a, A> !UnwindSafe for IP6SendStruct<'a, A>

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.