wrc 0.4.2

A thread-safe weighted reference counting smart-pointer for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
pub trait Weight {
    /// Add weight to the existing weight value, with overflow checking.
    fn add_weight(&self, _: usize) -> Option<usize>;

    /// Subtract weight to the existing weight value, with overflow checking.
    fn drop_weight(&self, _: usize) -> Option<usize>;

    /// Get the weight of the value.
    fn get_weight(&self) -> usize;
}