[][src]Enum srt_protocol::packet::SocketType

pub enum SocketType {
    Stream,
    Datagram,
}

The socket type for a handshake.

Variants

Stream

A stream socket, 1 when serialized

Datagram

A datagram socket, 2 when serialied

Implementations

impl SocketType[src]

pub fn from_u16(num: u16) -> Result<SocketType, u16>[src]

Turns a u32 into a SocketType. If the u32 wasn't valid (only 1 and 2 are valid), than it returns Err(num)

Trait Implementations

impl Clone for SocketType[src]

impl Copy for SocketType[src]

impl Debug for SocketType[src]

impl Eq for SocketType[src]

impl PartialEq<SocketType> for SocketType[src]

impl StructuralEq for SocketType[src]

impl StructuralPartialEq for SocketType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,