pub struct MockUdp<'a, A: Alarm<'a>> {
pub alarm: &'a A,
/* private fields */
}
Fields§
§alarm: &'a A
Implementations§
Source§impl<'a, A: Alarm<'a>> MockUdp<'a, A>
impl<'a, A: Alarm<'a>> MockUdp<'a, A>
pub fn new( id: u16, alarm: &'a A, udp_sender: &'a dyn UDPSender<'a>, udp_receiver: &'a UDPReceiver<'a>, port_table: &'static UdpPortManager, udp_dgram: SubSliceMut<'static, u8>, dst_port: u16, net_cap: &'static NetworkCapability, ) -> MockUdp<'a, A>
pub fn start_sending(&self)
pub fn update_capability(&self, new_cap: &'static NetworkCapability)
pub fn stop_sending(&self)
pub fn bind(&self, src_port: u16)
pub fn set_dst(&self, dst_port: u16)
pub fn send(&self, value: u16) -> Result<(), ErrorCode>
Trait Implementations§
Source§impl<'a, A: Alarm<'a>> AlarmClient for MockUdp<'a, A>
impl<'a, A: Alarm<'a>> AlarmClient for MockUdp<'a, A>
Source§impl<'a, A: Alarm<'a>> UDPRecvClient for MockUdp<'a, A>
impl<'a, A: Alarm<'a>> UDPRecvClient for MockUdp<'a, A>
Auto Trait Implementations§
impl<'a, A> !Freeze for MockUdp<'a, A>
impl<'a, A> !RefUnwindSafe for MockUdp<'a, A>
impl<'a, A> !Send for MockUdp<'a, A>
impl<'a, A> !Sync for MockUdp<'a, A>
impl<'a, A> Unpin for MockUdp<'a, A>
impl<'a, A> !UnwindSafe for MockUdp<'a, 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