pub struct GetAll<'a, VE: ValueEncoding> { /* private fields */ }
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§
source§impl<'a, VE: ValueEncoding> GetAll<'a, VE>
impl<'a, VE: ValueEncoding> GetAll<'a, VE>
sourcepub fn iter(&self) -> ValueIter<'a, VE> ⓘ
pub fn iter(&self) -> ValueIter<'a, VE> ⓘ
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§
source§impl<'a, 'b: 'a, VE: ValueEncoding> IntoIterator for &'b GetAll<'a, VE>
impl<'a, 'b: 'a, VE: ValueEncoding> IntoIterator for &'b GetAll<'a, VE>
source§impl<'a, VE> IntoIterator for GetAll<'a, VE>where
VE: 'a + ValueEncoding,
impl<'a, VE> IntoIterator for GetAll<'a, VE>where
VE: 'a + ValueEncoding,
Auto Trait Implementations§
impl<'a, VE> Freeze for GetAll<'a, VE>
impl<'a, VE> RefUnwindSafe for GetAll<'a, VE>where
VE: RefUnwindSafe,
impl<'a, VE> Send for GetAll<'a, VE>where
VE: Send,
impl<'a, VE> Sync for GetAll<'a, VE>where
VE: Sync,
impl<'a, VE> Unpin for GetAll<'a, VE>where
VE: Unpin,
impl<'a, VE> UnwindSafe for GetAll<'a, VE>where
VE: 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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request