pub enum Router {
Show 19 variants Sleep { amount: Duration, }, ServerBufferCount { packet_count: u32, }, ServerDropRate { packet_count: u32, }, ServerReorderRate { packet_count: u32, }, ServerCorruptRate { packet_count: u32, }, ServerDelay { amount: Duration, }, ServerJitter { amount: Duration, }, ServerMtu { mtu: u16, }, ClientBufferCount { packet_count: u32, }, ClientDropRate { packet_count: u32, }, ClientReorderRate { packet_count: u32, }, ClientCorruptRate { packet_count: u32, }, ClientDelay { amount: Duration, }, ClientJitter { amount: Duration, }, ClientMtu { mtu: u16, }, ClientRebindPortRate { packet_count: u32, }, ClientRebindAddressRate { packet_count: u32, }, RebindAll { ports: bool, addresses: bool, }, Trace { trace_id: u64, },
}

Variants§

§

Sleep

Fields

§amount: Duration

Pause for the specified duration before processing the next op

§

ServerBufferCount

Fields

§packet_count: u32

Set the number of packets that can be buffered server->client

§

ServerDropRate

Fields

§packet_count: u32

Set the chance of a server->client packet being dropped

§

ServerReorderRate

Fields

§packet_count: u32

Set the chance of a server->client packet being reordered

§

ServerCorruptRate

Fields

§packet_count: u32

Set the chance of a server->client packet being corrupted

§

ServerDelay

Fields

§amount: Duration

Set the amount of delay for server->client packets

§

ServerJitter

Fields

§amount: Duration

Set the amount of jitter for server->client packets

§

ServerMtu

Fields

§mtu: u16

Set the server->client MTU

§

ClientBufferCount

Fields

§packet_count: u32

Set the number of packets that can be buffered server->client

§

ClientDropRate

Fields

§packet_count: u32

Set the chance of a client->server packet being dropped

§

ClientReorderRate

Fields

§packet_count: u32

Set the chance of a client->server packet being reordered

§

ClientCorruptRate

Fields

§packet_count: u32

Set the chance of a client->server packet being corrupted

§

ClientDelay

Fields

§amount: Duration

Set the amount of delay for client->server packets

§

ClientJitter

Fields

§amount: Duration

Set the amount of jitter for client->server packets

§

ClientMtu

Fields

§mtu: u16

Set the client->server MTU

§

ClientRebindPortRate

Fields

§packet_count: u32

Set the chance of a port being rebound

§

ClientRebindAddressRate

Fields

§packet_count: u32

Set the chance of an IP being rebound

§

RebindAll

Fields

§ports: bool
§addresses: bool

Rebinds all of the ports and/or addresses currently being used

§

Trace

Fields

§trace_id: u64

Emit a trace event

Trait Implementations§

source§

impl Clone for Router

source§

fn clone(&self) -> Router

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Router

source§

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

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

impl<'de> Deserialize<'de> for Router

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for Router

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for Router

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Router

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for Router

source§

impl Eq for Router

source§

impl StructuralEq for Router

source§

impl StructuralPartialEq for Router

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> 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> Print for T
where T: Serialize,

source§

fn print(&self) -> Result<()>

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
source§

impl<T, U> Upcast<T> for U
where T: UpcastFrom<U>,

source§

fn upcast(self) -> T

source§

impl<T, B> UpcastFrom<Counter<T, B>> for T

source§

fn upcast_from(value: Counter<T, B>) -> T

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,