pub struct AccountingStats {
pub retrieved: f64,
pub status: String,
pub interval_end: Option<String>,
pub time_until_reset: u64,
pub read_bytes: u64,
pub read_bytes_left: u64,
pub read_limit: u64,
pub written_bytes: u64,
pub write_bytes_left: u64,
pub write_limit: u64,
}Expand description
Accounting statistics for bandwidth limiting.
Contains information about Tor’s accounting status when AccountingMax is set in the torrc. This includes read/write limits and current usage.
§Example
use stem_rs::controller::Controller;
let mut controller = Controller::from_port("127.0.0.1:9051".parse()?).await?;
controller.authenticate(None).await?;
let stats = controller.get_accounting_stats().await?;
println!("Status: {}", stats.status);
println!("Read: {} bytes", stats.read_bytes);Fields§
§retrieved: f64Unix timestamp when this was retrieved
status: StringHibernation status: “awake”, “soft”, or “hard”
interval_end: Option<String>Time when accounting interval ends (ISO format string)
time_until_reset: u64Seconds until limits reset
read_bytes: u64Bytes read during this interval
read_bytes_left: u64Bytes remaining before read limit
read_limit: u64Read limit in bytes
written_bytes: u64Bytes written during this interval
write_bytes_left: u64Bytes remaining before write limit
write_limit: u64Write limit in bytes
Trait Implementations§
Source§impl Clone for AccountingStats
impl Clone for AccountingStats
Source§fn clone(&self) -> AccountingStats
fn clone(&self) -> AccountingStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AccountingStats
impl RefUnwindSafe for AccountingStats
impl Send for AccountingStats
impl Sync for AccountingStats
impl Unpin for AccountingStats
impl UnwindSafe for AccountingStats
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