Trait oxide_auth::endpoint::UniqueValue[][src]

pub unsafe trait UniqueValue {
    fn get_unique(&self) -> Option<&str>;
}
Expand description

Return a reference to value in a collection if it is the only one.

For example, a vector of string like types returns a reference to its first element if there are no other, else it returns None.

If this were done with slices, that would require choosing a particular value type of the underlying slice e.g. [String].

Required methods

Borrow the unique value reference.

Implementations on Foreign Types

Implementors