[−][src]Trait async_coap::option::OptionIteratorExt
Extension trait for option iterators that provide additional convenient accessors.
Required methods
fn find_next(
&mut self,
key: OptionNumber
) -> Option<Result<(OptionNumber, &'a [u8]), Error>>
&mut self,
key: OptionNumber
) -> Option<Result<(OptionNumber, &'a [u8]), Error>>
Moves the iterator forward until it finds a matching key or the spot where it should have been.
If found, returns the option number and a byte slice of the value.
Does not consume any options after the matching key.
Provided methods
fn find_next_of<T>(&mut self, key: OptionKey<T>) -> Option<Result<T, Error>> where
T: TryOptionValueFrom<'a> + Sized,
T: TryOptionValueFrom<'a> + Sized,
Typed version of OptionIteratorExt::find_next
.
Moves the iterator forward until it finds a matching key or the spot where it should have been.
If found, returns the value of the option key.
Does not consume any options after the matching key.
fn extract_uri(&self) -> Result<RelRefBuf, Error> where
Self: Sized + Clone,
Self: Sized + Clone,
Extracts a URI relative-reference from the remaining URI_PATH and URI_QUERY options, moving the iterator past them.
fn extract_location(&self) -> Result<RelRefBuf, Error> where
Self: Sized + Clone,
Self: Sized + Clone,
Extracts a URI relative-reference from the remaining LOCATION_PATH and LOCATION_QUERY options, moving the iterator past them.
Implementors
impl<'a, I> OptionIteratorExt<'a> for I where
I: Iterator<Item = Result<(OptionNumber, &'a [u8]), Error>> + Sized + Clone,
[src]
I: Iterator<Item = Result<(OptionNumber, &'a [u8]), Error>> + Sized + Clone,