Struct tonic::metadata::GetAll [−][src]
pub struct GetAll<'a, VE: ValueEncoding> { /* fields omitted */ }
Expand description
A view to all values stored in a single entry.
This struct is returned by MetadataMap::get_all
and
MetadataMap::get_all_bin
.
Implementations
Returns an iterator visiting all values associated with the entry.
Values are iterated in insertion order.
Examples
let mut map = MetadataMap::new();
map.insert("x-host", "hello.world".parse().unwrap());
map.append("x-host", "hello.earth".parse().unwrap());
let values = map.get_all("x-host");
let mut iter = values.iter();
assert_eq!(&"hello.world", iter.next().unwrap());
assert_eq!(&"hello.earth", iter.next().unwrap());
assert!(iter.next().is_none());
Trait Implementations
type Item = &'a MetadataValue<VE>
type Item = &'a MetadataValue<VE>
The type of the elements being iterated over.
type Item = &'a MetadataValue<VE>
type Item = &'a MetadataValue<VE>
The type of the elements being iterated over.
Auto Trait Implementations
impl<'a, VE> RefUnwindSafe for GetAll<'a, VE> where
VE: RefUnwindSafe,
impl<'a, VE> UnwindSafe for GetAll<'a, VE> where
VE: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more