[−][src]Struct rustls_extra::ApplicationLayerProtocolNegotiationProtocols
Application layer protocols to negotiate in preference order.
Methods
impl ApplicationLayerProtocolNegotiationProtocols
[src]
pub fn to_rustls_form(&self) -> Vec<Vec<u8>>
[src]
To the form required by rustls.
Methods from Deref<Target = IndexSet<ApplicationLayerProtocolNegotiationProtocol>>
pub fn len(&self) -> usize
[src]
Return the number of elements in the set.
Computes in O(1) time.
pub fn is_empty(&self) -> bool
[src]
Returns true if the set contains no elements.
Computes in O(1) time.
pub fn hasher(&self) -> &S where
S: BuildHasher,
[src]
S: BuildHasher,
Return a reference to the set's BuildHasher
.
pub fn capacity(&self) -> usize
[src]
Computes in O(1) time.
pub fn clear(&mut self)
[src]
Remove all elements in the set, while preserving its capacity.
Computes in O(n) time.
pub fn reserve(&mut self, additional: usize)
[src]
FIXME Not implemented fully yet
pub fn insert(&mut self, value: T) -> bool
[src]
Insert the value into the set.
If an equivalent item already exists in the set, it returns
false
leaving the original value in the set and without
altering its insertion order. Otherwise, it inserts the new
item and returns true
.
Computes in O(1) time (amortized average).
pub fn insert_full(&mut self, value: T) -> (usize, bool)
[src]
Insert the value into the set, and get its index.
If an equivalent item already exists in the set, it returns
the index of the existing item and false
, leaving the
original value in the set and without altering its insertion
order. Otherwise, it inserts the new item and returns the index
of the inserted item and true
.
Computes in O(1) time (amortized average).
pub fn iter(&self) -> Iter<T>
[src]
Return an iterator over the values of the set, in their order
pub fn difference<S2>(
&'a self,
other: &'a IndexSet<T, S2>
) -> Difference<'a, T, S2> where
S2: BuildHasher,
[src]
&'a self,
other: &'a IndexSet<T, S2>
) -> Difference<'a, T, S2> where
S2: BuildHasher,
Return an iterator over the values that are in self
but not other
.
Values are produced in the same order that they appear in self
.
pub fn symmetric_difference<S2>(
&'a self,
other: &'a IndexSet<T, S2>
) -> SymmetricDifference<'a, T, S, S2> where
S2: BuildHasher,
[src]
&'a self,
other: &'a IndexSet<T, S2>
) -> SymmetricDifference<'a, T, S, S2> where
S2: BuildHasher,
Return an iterator over the values that are in self
or other
,
but not in both.
Values from self
are produced in their original order, followed by
values from other
in their original order.
pub fn intersection<S2>(
&'a self,
other: &'a IndexSet<T, S2>
) -> Intersection<'a, T, S2> where
S2: BuildHasher,
[src]
&'a self,
other: &'a IndexSet<T, S2>
) -> Intersection<'a, T, S2> where
S2: BuildHasher,
Return an iterator over the values that are in both self
and other
.
Values are produced in the same order that they appear in self
.
pub fn union<S2>(&'a self, other: &'a IndexSet<T, S2>) -> Union<'a, T, S> where
S2: BuildHasher,
[src]
S2: BuildHasher,
Return an iterator over all values that are in self
or other
.
Values from self
are produced in their original order, followed by
values that are unique to other
in their original order.
pub fn contains<Q>(&self, value: &Q) -> bool where
Q: Hash + Equivalent<T> + ?Sized,
[src]
Q: Hash + Equivalent<T> + ?Sized,
Return true
if an equivalent to value
exists in the set.
Computes in O(1) time (average).
pub fn get<Q>(&self, value: &Q) -> Option<&T> where
Q: Hash + Equivalent<T> + ?Sized,
[src]
Q: Hash + Equivalent<T> + ?Sized,
Return a reference to the value stored in the set, if it is present,
else None
.
Computes in O(1) time (average).
pub fn get_full<Q>(&self, value: &Q) -> Option<(usize, &T)> where
Q: Hash + Equivalent<T> + ?Sized,
[src]
Q: Hash + Equivalent<T> + ?Sized,
Return item index and value
pub fn replace(&mut self, value: T) -> Option<T>
[src]
Adds a value to the set, replacing the existing value, if any, that is equal to the given one. Returns the replaced value.
Computes in O(1) time (average).
pub fn remove<Q>(&mut self, value: &Q) -> bool where
Q: Hash + Equivalent<T> + ?Sized,
[src]
Q: Hash + Equivalent<T> + ?Sized,
FIXME Same as .swap_remove
Computes in O(1) time (average).
pub fn swap_remove<Q>(&mut self, value: &Q) -> bool where
Q: Hash + Equivalent<T> + ?Sized,
[src]
Q: Hash + Equivalent<T> + ?Sized,
Remove the value from the set, and return true
if it was present.
Like Vec::swap_remove
, the value is removed by swapping it with the
last element of the set and popping it off. This perturbs
the postion of what used to be the last element!
Return false
if value
was not in the set.
Computes in O(1) time (average).
pub fn take<Q>(&mut self, value: &Q) -> Option<T> where
Q: Hash + Equivalent<T> + ?Sized,
[src]
Q: Hash + Equivalent<T> + ?Sized,
FIXME Same as .swap_take
Computes in O(1) time (average).
pub fn swap_take<Q>(&mut self, value: &Q) -> Option<T> where
Q: Hash + Equivalent<T> + ?Sized,
[src]
Q: Hash + Equivalent<T> + ?Sized,
Removes and returns the value in the set, if any, that is equal to the given one.
Like Vec::swap_remove
, the value is removed by swapping it with the
last element of the set and popping it off. This perturbs
the postion of what used to be the last element!
Return None
if value
was not in the set.
Computes in O(1) time (average).
pub fn swap_remove_full<Q>(&mut self, value: &Q) -> Option<(usize, T)> where
Q: Hash + Equivalent<T> + ?Sized,
[src]
Q: Hash + Equivalent<T> + ?Sized,
Remove the value from the set return it and the index it had.
Like Vec::swap_remove
, the value is removed by swapping it with the
last element of the set and popping it off. This perturbs
the postion of what used to be the last element!
Return None
if value
was not in the set.
pub fn pop(&mut self) -> Option<T>
[src]
Remove the last value
Computes in O(1) time (average).
pub fn retain<F>(&mut self, keep: F) where
F: FnMut(&T) -> bool,
[src]
F: FnMut(&T) -> bool,
Scan through each value in the set and keep those where the
closure keep
returns true
.
The elements are visited in order, and remaining elements keep their order.
Computes in O(n) time (average).
pub fn sort(&mut self) where
T: Ord,
[src]
T: Ord,
Sort the set’s values by their default ordering.
See sort_by
for details.
pub fn sort_by<F>(&mut self, compare: F) where
F: FnMut(&T, &T) -> Ordering,
[src]
F: FnMut(&T, &T) -> Ordering,
Sort the set’s values in place using the comparison function compare
.
Computes in O(n log n) time and O(n) space. The sort is stable.
pub fn drain(&mut self, range: RangeFull) -> Drain<T>
[src]
Clears the IndexSet
, returning all values as a drain iterator.
Keeps the allocated memory for reuse.
pub fn get_index(&self, index: usize) -> Option<&T>
[src]
Get a value by index
Valid indices are 0 <= index < self.len()
Computes in O(1) time.
pub fn swap_remove_index(&mut self, index: usize) -> Option<T>
[src]
Remove the key-value pair by index
Valid indices are 0 <= index < self.len()
Computes in O(1) time (average).
pub fn is_disjoint<S2>(&self, other: &IndexSet<T, S2>) -> bool where
S2: BuildHasher,
[src]
S2: BuildHasher,
Returns true
if self
has no elements in common with other
.
pub fn is_subset<S2>(&self, other: &IndexSet<T, S2>) -> bool where
S2: BuildHasher,
[src]
S2: BuildHasher,
Returns true
if all elements of self
are contained in other
.
pub fn is_superset<S2>(&self, other: &IndexSet<T, S2>) -> bool where
S2: BuildHasher,
[src]
S2: BuildHasher,
Returns true
if all elements of other
are contained in self
.
Trait Implementations
impl Eq for ApplicationLayerProtocolNegotiationProtocols
[src]
impl Clone for ApplicationLayerProtocolNegotiationProtocols
[src]
fn clone(&self) -> ApplicationLayerProtocolNegotiationProtocols
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<ApplicationLayerProtocolNegotiationProtocols> for ApplicationLayerProtocolNegotiationProtocols
[src]
fn eq(&self, other: &ApplicationLayerProtocolNegotiationProtocols) -> bool
[src]
fn ne(&self, other: &ApplicationLayerProtocolNegotiationProtocols) -> bool
[src]
impl Default for ApplicationLayerProtocolNegotiationProtocols
[src]
impl DerefMut for ApplicationLayerProtocolNegotiationProtocols
[src]
impl Deref for ApplicationLayerProtocolNegotiationProtocols
[src]
type Target = IndexSet<ApplicationLayerProtocolNegotiationProtocol>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl Debug for ApplicationLayerProtocolNegotiationProtocols
[src]
Auto Trait Implementations
impl Send for ApplicationLayerProtocolNegotiationProtocols
impl Sync for ApplicationLayerProtocolNegotiationProtocols
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,