pub struct Tc {
pub delay: Option<String>,
pub jitter: Option<String>,
pub loss: Option<f64>,
pub rate: Option<String>,
}Expand description
Link impairment (Linux netem on the router’s interface into the network).
Fields§
§delay: Option<String>The one-way delay added to every packet entering the network, e.g. 50ms, 1s.
jitter: Option<String>Random variation of the delay, e.g. 5ms (needs delay).
loss: Option<f64>The share of packets entering the network that are dropped at random, in percent
(0.5 = 0.5%).
rate: Option<String>The bandwidth cap on traffic entering the network, as tc writes a rate, e.g. 10mbit,
512kbit.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tc
impl<'de> Deserialize<'de> for Tc
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 JsonSchema for Tc
impl JsonSchema for Tc
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Tc
Auto Trait Implementations§
impl Freeze for Tc
impl RefUnwindSafe for Tc
impl Send for Tc
impl Sync for Tc
impl Unpin for Tc
impl UnsafeUnpin for Tc
impl UnwindSafe for Tc
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