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 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.