pub struct RequestResponseConfig {
pub protocol: String,
pub timeout: Option<Duration>,
pub max_request_size: usize,
pub max_response_size: usize,
pub concurrent_streams: Option<usize>,
pub channel_buffer: usize,
pub protocol_direction: RequestResponseDirection,
}Fields§
§protocol: String§timeout: Option<Duration>§max_request_size: usize§max_response_size: usize§concurrent_streams: Option<usize>§channel_buffer: usize§protocol_direction: RequestResponseDirectionImplementations§
Source§impl RequestResponseConfig
impl RequestResponseConfig
pub fn new(protocol: impl Into<String>) -> RequestResponseConfig
Sourcepub fn set_timeout(self, timeout: Duration) -> RequestResponseConfig
pub fn set_timeout(self, timeout: Duration) -> RequestResponseConfig
Set a duration which would indicate on how long it should take for a response before the request times out.
Sourcepub fn set_max_request_size(self, size: usize) -> RequestResponseConfig
pub fn set_max_request_size(self, size: usize) -> RequestResponseConfig
Set the maximum size of a request.
Sourcepub fn set_max_response_size(self, size: usize) -> RequestResponseConfig
pub fn set_max_response_size(self, size: usize) -> RequestResponseConfig
Set the maximum size of a response.
Sourcepub fn set_concurrent_streams(self, size: usize) -> RequestResponseConfig
pub fn set_concurrent_streams(self, size: usize) -> RequestResponseConfig
Set the upper bound of inbound and outbound streams.
Sourcepub fn set_channel_buffer(self, size: usize) -> RequestResponseConfig
pub fn set_channel_buffer(self, size: usize) -> RequestResponseConfig
Set the max slot available to send requests over channels.
pub fn set_protocol_direction( self, direction: RequestResponseDirection, ) -> RequestResponseConfig
Trait Implementations§
Source§impl Clone for RequestResponseConfig
impl Clone for RequestResponseConfig
Source§fn clone(&self) -> RequestResponseConfig
fn clone(&self) -> RequestResponseConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RequestResponseConfig
impl Debug for RequestResponseConfig
Source§impl Default for RequestResponseConfig
impl Default for RequestResponseConfig
Source§fn default() -> RequestResponseConfig
fn default() -> RequestResponseConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RequestResponseConfig
impl RefUnwindSafe for RequestResponseConfig
impl Send for RequestResponseConfig
impl Sync for RequestResponseConfig
impl Unpin for RequestResponseConfig
impl UnsafeUnpin for RequestResponseConfig
impl UnwindSafe for RequestResponseConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more