pub struct ClientRequest<'call, 'state> { /* private fields */ }Expand description
Borrowed request wrapper exposed to client middleware.
This allows middleware to add dynamic metadata while keeping the backing storage alive until the wrapped caller finishes sending the request.
Implementations§
Source§impl<'call, 'state> ClientRequest<'call, 'state>
impl<'call, 'state> ClientRequest<'call, 'state>
pub fn call(&self) -> &RequestCall<'call>
pub fn metadata(&self) -> &[MetadataEntry<'call>]
pub fn metadata_mut(&mut self) -> &mut Metadata<'call>
pub fn push_string_metadata( &mut self, key: &'static str, value: impl Into<String>, flags: MetadataFlags, )
pub fn push_bytes_metadata( &mut self, key: &'static str, value: impl Into<Vec<u8>>, flags: MetadataFlags, )
pub fn push_u64_metadata( &mut self, key: &'static str, value: u64, flags: MetadataFlags, )
Auto Trait Implementations§
impl<'call, 'state> Freeze for ClientRequest<'call, 'state>
impl<'call, 'state> RefUnwindSafe for ClientRequest<'call, 'state>
impl<'call, 'state> Send for ClientRequest<'call, 'state>
impl<'call, 'state> !Sync for ClientRequest<'call, 'state>
impl<'call, 'state> Unpin for ClientRequest<'call, 'state>
impl<'call, 'state> UnsafeUnpin for ClientRequest<'call, 'state>
impl<'call, 'state> !UnwindSafe for ClientRequest<'call, 'state>
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