pub struct TCWorkingSet(/* private fields */);
Expand description
***** TCWorkingSet *****
A TCWorkingSet represents a snapshot of the working set for a replica. It is not automatically updated based on changes in the replica. Its lifetime is independent of the replica and it can be freed at any time.
To iterate over a working set, search indexes 1 through largest_index.
§Safety
The *TCWorkingSet
returned from tc_replica_working_set
is owned by the caller and
must later be freed to avoid a memory leak. Its lifetime is independent of the replica
from which it was generated.
Any function taking a *TCWorkingSet
requires:
- the pointer must not be NUL;
- the pointer must be one previously returned from
tc_replica_working_set
- the memory referenced by the pointer must never be accessed by C code; and
- except for
tc_replica_free
, ownership of a*TCWorkingSet
remains with the caller.
Once passed to tc_replica_free
, a *TCWorkingSet
becomes invalid and must not be used again.
TCWorkingSet is not threadsafe.
typedef struct TCWorkingSet TCWorkingSet;
Trait Implementations§
Source§impl From<WorkingSet> for TCWorkingSet
impl From<WorkingSet> for TCWorkingSet
Source§fn from(ws: WorkingSet) -> TCWorkingSet
fn from(ws: WorkingSet) -> TCWorkingSet
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TCWorkingSet
impl RefUnwindSafe for TCWorkingSet
impl Send for TCWorkingSet
impl Sync for TCWorkingSet
impl Unpin for TCWorkingSet
impl UnwindSafe for TCWorkingSet
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more