Skip to main content

RejectCode

Struct RejectCode 

Source
pub struct RejectCode(pub u32);
Expand description

Why a handshake is refused: the code in the Handshake Type field.

Tuple Fields§

§0: u32

Implementations§

Source§

impl RejectCode

Source

pub const UNKNOWN: Self

1000: no reason given (the fallback).

Source

pub const SYSTEM: Self

1001: a system function failed.

Source

pub const PEER: Self

1002: refused by the peer, with no further detail.

Source

pub const RESOURCE: Self

1003: a resource, usually memory, could not be allocated.

Source

pub const ROGUE: Self

1004: the handshake data could not be interpreted; sent for malformed or inconsistent handshakes.

Source

pub const BACKLOG: Self

1005: the listener is full; sent when Config::max_connections is reached.

Source

pub const CLOSE: Self

1007: the listener was closing when the request arrived.

Source

pub const VERSION: Self

1008: the peer’s version is not supported; sent for any handshake version other than 5.

Source

pub const BADSECRET: Self

1010: the passphrases differ; sent when the caller’s key material cannot be accepted with ours.

Source

pub const UNSECURE: Self

1011: only one side has a passphrase; sent when encryption is configured or required and the caller sends none, or the reverse.

Source

pub const MESSAGE_API: Self

1012: stream and message mode differ; sent when the caller asks for stream mode.

Source

pub const CONGESTION: Self

1013: the congestion controllers differ; sent for anything but live.

Source

pub const FILTER: Self

1014: packet filter settings differ; sent when the caller asks for a filter.

Source

pub const GROUP: Self

1015: group settings are incompatible; sent when the caller asks for a group.

Source

pub const fn http(status: u16) -> Self

An application refusal carrying an HTTP status (2000 + status), which libsrt reports as PREDEFINED:<status>.

Trait Implementations§

Source§

impl Clone for RejectCode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RejectCode

Source§

impl Debug for RejectCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for RejectCode

Source§

impl PartialEq for RejectCode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RejectCode

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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.