pub enum Level<T> {
Simple(T),
Parameter(T),
}Expand description
Level of an Endpoint.
§Example
let endpoint = Endpoint::try_from("/sensor/%{name}/id").unwrap();
let mut iter = endpoint.iter();
assert_eq!(iter.next(), Some(&Level::Simple("sensor")));
assert_eq!(iter.next(), Some(&Level::Parameter("name")));
assert_eq!(iter.next(), Some(&Level::Simple("id")));
assert_eq!(iter.next(), None);Variants§
Trait Implementations§
Source§impl<T: Ord> Ord for Level<T>
impl<T: Ord> Ord for Level<T>
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd> PartialOrd for Level<T>
impl<T: PartialOrd> PartialOrd for Level<T>
impl<T: Copy> Copy for Level<T>
impl<T: Eq> Eq for Level<T>
Auto Trait Implementations§
impl<T> Freeze for Level<T>where
T: Freeze,
impl<T> RefUnwindSafe for Level<T>where
T: RefUnwindSafe,
impl<T> Send for Level<T>where
T: Send,
impl<T> Sync for Level<T>where
T: Sync,
impl<T> Unpin for Level<T>where
T: Unpin,
impl<T> UnsafeUnpin for Level<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Level<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.