pub struct Settings {
pub channel: ClientConfig,
pub unary_timeout: Duration,
pub stream_timeout: Duration,
pub compression: CompressionMode,
pub compression_threshold: u64,
pub instance_id: String,
}Expand description
Настройки клиентов инстанса: канал, таймауты, сжатие и имя инстанса.
Fields§
§channel: ClientConfigНастройки каналов grpc.client.
unary_timeout: DurationТаймаут одиночного вызова по умолчанию.
stream_timeout: DurationТаймаут потока по умолчанию.
compression: CompressionModeРежим сжатия запросов.
compression_threshold: u64Порог сжатия, в байтах: сообщения короче не сжимаются.
instance_id: StringИдентификатор инстанса: уходит соседу заголовком.
Trait Implementations§
impl Eq for Settings
impl StructuralPartialEq for Settings
Auto Trait Implementations§
impl Forget for Settings
impl Freeze for Settings
impl Move for Settings
impl RefUnwindSafe for Settings
impl Send for Settingswhere
RawVecInner: Send,
impl Sync for Settingswhere
RawVecInner: Sync,
impl Unpin for Settings
impl UnsafeUnpin for Settings
impl UnwindSafe for Settingswhere
RawVecInner: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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