pub enum TryResult<R> {
    Present(R),
    Absent,
    Locked,
}
Expand description

Represents the result of a non-blocking read from a DashMap.

Variants

Present(R)

The value was present in the map, and the lock for the shard was successfully obtained.

Absent

The shard wasn’t locked, and the value wasn’t present in the map.

Locked

The shard was locked.

Implementations

Returns true if the value was present in the map, and the lock for the shard was successfully obtained.

Returns true if the shard wasn’t locked, and the value wasn’t present in the map.

Returns true if the shard was locked.

If self is Present, returns the reference to the value in the map. Panics if self is not Present.

If self is Present, returns the reference to the value in the map. If self is not Present, returns None.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.