Struct gnunet_sys::GNUNET_BANDWIDTH_Tracker [−][src]
Struct to track available bandwidth. Combines a time stamp with a number of bytes transmitted, a quota and a maximum amount that carries over. Not opaque so that it can be inlined into data structures (reducing malloc-ing); however, values should not be accessed directly by clients (hence the ‘__’).
Fields
update_cb_cls: *mut c_void
Closure for @e update_cb.
update_cb: GNUNET_BANDWIDTH_TrackerUpdateCallback
Function we call if the tracker’s bandwidth is increased and a previously returned timeout might now expire earlier.
excess_cb_cls: *mut c_void
Closure for @e excess_cb.
excess_cb: GNUNET_BANDWIDTH_ExcessNotificationCallback
Function we call if the tracker is about to throw away bandwidth due to excess (max carry exceeded).
consumption_since_last_update__: i64
Number of bytes consumed since we last updated the tracker.
excess_task: *mut GNUNET_SCHEDULER_Task
Task scheduled to call the @e excess_cb once we have reached the maximum bandwidth the tracker can hold.
last_update__: GNUNET_TIME_Absolute
Time when we last updated the tracker.
available_bytes_per_s__: u32
Bandwidth limit to enforce in bytes per second.
max_carry_s__: u32
Maximum number of seconds over which bandwidth may “accumulate”. Note that additionally, we also always allow at least #GNUNET_MAX_MESSAGE_SIZE to accumulate.
Trait Implementations
impl Clone for GNUNET_BANDWIDTH_Tracker
[src]
fn clone(&self) -> GNUNET_BANDWIDTH_Tracker
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for GNUNET_BANDWIDTH_Tracker
[src]
impl Debug for GNUNET_BANDWIDTH_Tracker
[src]
Auto Trait Implementations
impl RefUnwindSafe for GNUNET_BANDWIDTH_Tracker
impl !Send for GNUNET_BANDWIDTH_Tracker
impl !Sync for GNUNET_BANDWIDTH_Tracker
impl Unpin for GNUNET_BANDWIDTH_Tracker
impl UnwindSafe for GNUNET_BANDWIDTH_Tracker
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,