pub struct UdpBudget {
pub datagrams_per_sec: u32,
pub bytes_per_sec: u32,
pub burst: u32,
}Available on crate feature
udp only.Expand description
Rates for one budget: datagrams and bytes per second, and how many datagrams may arrive at once. The byte bucket holds one second of bytes.
let budget = net_io::UdpBudget { datagrams_per_sec: 100, bytes_per_sec: 150_000, burst: 20 };Fields§
§datagrams_per_sec: u32Datagrams per second, sustained.
bytes_per_sec: u32Bytes per second, sustained.
burst: u32Datagrams that may arrive at once (the datagram bucket’s depth).
Implementations§
Trait Implementations§
impl Copy for UdpBudget
impl Eq for UdpBudget
impl StructuralPartialEq for UdpBudget
Auto Trait Implementations§
impl Freeze for UdpBudget
impl RefUnwindSafe for UdpBudget
impl Send for UdpBudget
impl Sync for UdpBudget
impl Unpin for UdpBudget
impl UnsafeUnpin for UdpBudget
impl UnwindSafe for UdpBudget
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