pub struct Config {
pub base_url: Url,
pub ws_url: Url,
pub api_key: Option<String>,
pub timeout_secs: u64,
pub max_retries: u32,
}
Fields§
§base_url: Url
§ws_url: Url
§api_key: Option<String>
§timeout_secs: u64
§max_retries: u32
Implementations§
Source§impl Config
impl Config
pub fn new() -> Self
pub fn with_api_key<S: Into<String>>(self, api_key: S) -> Self
pub fn with_base_url<S: AsRef<str>>(self, url: S) -> Result<Self>
pub fn with_ws_url<S: AsRef<str>>(self, url: S) -> Result<Self>
pub fn with_timeout(self, timeout_secs: u64) -> Self
pub fn with_max_retries(self, max_retries: u32) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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<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