pub enum SocketType {
Stream,
Datagram,
Raw,
Other(i32),
}Expand description
The transport semantics requested when opening a socket.
Variants§
Stream
A byte stream, normally TCP.
Datagram
Datagrams, normally UDP. Connected datagram reads and writes preserve message boundaries; message/address APIs remain separate extensions.
Raw
Raw IP packets. Opening these sockets may require privileges.
Other(i32)
A platform-native socket type, preserved by resolution and forwarded unchanged to socket creation. Native values are not portable between operating systems.
Trait Implementations§
Source§impl Clone for SocketType
impl Clone for SocketType
impl Copy for SocketType
Source§impl Debug for SocketType
impl Debug for SocketType
impl Eq for SocketType
Source§impl PartialEq for SocketType
impl PartialEq for SocketType
impl StructuralPartialEq for SocketType
Auto Trait Implementations§
impl Freeze for SocketType
impl RefUnwindSafe for SocketType
impl Send for SocketType
impl Sync for SocketType
impl Unpin for SocketType
impl UnsafeUnpin for SocketType
impl UnwindSafe for SocketType
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