[−][src]Enum ublox_cellular::sockets::Socket
A network socket.
This enumeration abstracts the various types of sockets based on the IP protocol.
To downcast a Socket
value to a concrete socket, use the AnySocket trait,
e.g. to get UdpSocket
, call UdpSocket::downcast(socket)
.
It is usually more convenient to use SocketSet::get instead.
Variants (Non-exhaustive)
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Udp(UdpSocket<L>)
Tcp(TcpSocket<L>)
Implementations
impl<L: ArrayLength<u8>> Socket<L>
[src]
pub fn get_type(&self) -> SocketType
[src]
pub fn available_data(&self) -> usize
[src]
pub fn set_available_data(&mut self, available_data: usize)
[src]
pub fn rx_enqueue_slice(&mut self, data: &[u8]) -> usize
[src]
pub fn rx_window(&self) -> usize
[src]
pub fn can_recv(&self) -> bool
[src]
impl<L: ArrayLength<u8>> Socket<L>
[src]
pub fn handle(&self) -> SocketHandle
[src]
Return the socket handle.
Trait Implementations
impl<L: ArrayLength<u8>> Into<Socket<L>> for TcpSocket<L>
[src]
impl<L: ArrayLength<u8>> Into<Socket<L>> for UdpSocket<L>
[src]
Auto Trait Implementations
impl<L> RefUnwindSafe for Socket<L> where
<L as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
<L as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<L> Send for Socket<L>
impl<L> Sync for Socket<L>
impl<L> Unpin for Socket<L> where
<L as ArrayLength<u8>>::ArrayType: Unpin,
<L as ArrayLength<u8>>::ArrayType: Unpin,
impl<L> UnwindSafe for Socket<L> where
<L as ArrayLength<u8>>::ArrayType: UnwindSafe,
<L as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,