Struct active_standby::primitives::shared::AsLock[][src]

pub struct AsLock<T> { /* fields omitted */ }
Expand description

Struct for holding tables that can be interacted with like an RwLock, including being shared across threads/tasks via Arc (as opposed to the lockless version which requires independent copies per task).

Implementations

Create a AsLock object for handling active_standby tables.

  • t1 & t2 are the two tables which will become the active and standby tables. They must be identical; this is left to the user to enforce.

Create a WriteGuard to allow users to update the the data. There will only be 1 WriteGuard at a time.

This function may be slow because:

  1. Lock contention on the standby_table. This can occur if a ReadGuard which was created before the last WriteGuard was dropped, still has not itself been dropped.
  2. Replaying all of the updates that were applied to the last WriteGuard.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.