# [−][src]Trait crossbeam_epoch::CompareAndSetOrdering

    pub trait CompareAndSetOrdering {
        fn success(&self) -> Ordering;
        fn failure(&self) -> Ordering;
    }

Memory orderings for compare-and-set operations.

A compare-and-set operation can have different memory orderings depending on whether it succeeds or fails. This trait generalizes different ways of specifying memory orderings.

The two ways of specifying orderings for compare-and-set are:

1. Just one `Ordering` for the success case. In case of failure, the strongest appropriate ordering is chosen.
2. A pair of `Ordering`s. The first one is for the success case, while the second one is for the failure case.

## Required methods

### `fn success(&self) -> Ordering`

The ordering of the operation when it succeeds.

### `fn failure(&self) -> Ordering`

The ordering of the operation when it fails.

The failure ordering can't be `Release` or `AcqRel` and must be equivalent or weaker than the success ordering.

Loading content...

## Implementations on Foreign Types

### `impl CompareAndSetOrdering for Ordering`[src]

#### `fn success(&self) -> Ordering`[src]

#### `fn failure(&self) -> Ordering`[src]

### `impl CompareAndSetOrdering for (Ordering, Ordering)`[src]

#### `fn success(&self) -> Ordering`[src]

#### `fn failure(&self) -> Ordering`[src]

Loading content...

## Implementors

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)