Struct mentat_core::counter::RcCounter [] [src]

pub struct RcCounter { /* fields omitted */ }

Methods

impl RcCounter
[src]

A simple shared counter.

[src]

[src]

[src]

Return the next value in the sequence.

use mentat_core::counter::RcCounter;

let c = RcCounter::with_initial(3);
assert_eq!(c.next(), 3);
assert_eq!(c.next(), 4);
let d = c.clone();
assert_eq!(d.next(), 5);
assert_eq!(c.next(), 6);

Trait Implementations

impl Clone for RcCounter
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more