Skip to main content

Crate tor_memquota_cost

Crate tor_memquota_cost 

Source
Expand description

§tor-memquota-cost

Cost-tracking trait for use with tor-memquota.

This is a separate crate so that crates that want to add a memory cost to a struct can do so without depending on the full tor-memquota.

§Compile-time features

  • memquota – Actually enable memory quota tracking. Without this feature, all the actual functionality is stubbed out. This provides a convenient way of conditionally enabling memory tracking.

  • full – Enable all features above.

License: MIT OR Apache-2.0

Re-exports§

pub use memory_cost::HasMemoryCost;

Modules§

if_enabled 🔒
Helper type for disabling memory tracking when not wanted
memory_cost
HasMemoryCost and typed memory cost tracking
memory_cost_derive 🔒
Deriving HasMemoryCost

Macros§

derive_deftly_template_HasMemoryCost
Derive HasMemoryCost
memory_cost_structural_copy
Implement HasMemoryCostStructural for Copy types

Structs§

EnabledToken
Token indicating that memory quota tracking is enabled, at both compile and runtime

Traits§

HasMemoryCostStructural
Types whose HasMemoryCost is derived structurally

Functions§

assert_copy_static
Compile-time check for Copy + 'static - helper for macros