Struct checkpoint::wrappers::GuardWrapper [] [src]

pub struct GuardWrapper<T> { /* fields omitted */ }

Protects checkpoint data by ensuring that no two uncommitted checkpoints can have the same identifier and that committed checkpoints cannot be removed while in use (i.e. have a binding created by either the commit_checkpoint method or the load_checkpoint method).

Protection is limited to interactions with a single GuardWrapper object directly.

For example, if multiple guarded FileStorage objects are opened with the same path, it is possible for one of them to remove a checkpoint even if the others have the same checkpoint marked as in-use.

Furthermore, GuardWrapper objects offer no protection against outside processes which may be operating on the underlying storage medium.

Methods

impl<T: Storage> GuardWrapper<T>
[src]

[src]

Adds a GuardWrapper around a Storage object.

Trait Implementations

impl<T: Debug> Debug for GuardWrapper<T>
[src]

[src]

Formats the value using the given formatter. Read more

impl<T: Storage> Storage for GuardWrapper<T>
[src]

The type representing committed checkpoints.

The type representing uncommitted checkpoints.

[src]

Creates a new checkpoint with the specified identifier. Read more

[src]

Commits an uncommitted checkpoint, permanently saving its data to the underlying storage medium. Read more

[src]

Loads the committed checkpoint associated with the provided identifier, allowing its data to be retrieved. Read more

[src]

Removes the committed checkpoint associated with the provided identifier. Read more

[src]

Returns a list of all committed checkpoint identifiers in the underlying storage medium.

Auto Trait Implementations

impl<T> Send for GuardWrapper<T> where
    T: Send

impl<T> Sync for GuardWrapper<T> where
    T: Sync