pub struct SteamUserBuilder { /* private fields */ }Expand description
Builder for SteamUser.
Obtained via SteamUser::builder. Required field: cookies. All other
fields fall back to the same defaults that SteamUser::new uses.
Implementations§
Source§impl SteamUserBuilder
impl SteamUserBuilder
Set the session cookies. Replaces any previously-set cookies.
Sourcepub fn rate_limit(self, requests_per_minute: u32, burst: u32) -> Self
pub fn rate_limit(self, requests_per_minute: u32, burst: u32) -> Self
Set a per-session rate limit (requests-per-minute, burst). Applied in addition to the global IP-wide limit.
Sourcepub fn timeout(self, timeout: Duration) -> Self
pub fn timeout(self, timeout: Duration) -> Self
Override the per-request timeout (default: 300s).
Sourcepub fn connect_timeout(self, connect_timeout: Duration) -> Self
pub fn connect_timeout(self, connect_timeout: Duration) -> Self
Override the TCP connect timeout (default: 30s).
Sourcepub fn external_timeout(self, external_timeout: Duration) -> Self
pub fn external_timeout(self, external_timeout: Duration) -> Self
Override the timeout for the external (non-Steam) client (default: 60s).
Sourcepub fn user_agent(self, user_agent: impl Into<String>) -> Self
pub fn user_agent(self, user_agent: impl Into<String>) -> Self
Override the User-Agent header.
Sourcepub fn retry_count(self, retry_count: u32) -> Self
pub fn retry_count(self, retry_count: u32) -> Self
Override the retry count (default: 3 retries = 4 total attempts).
Sourcepub fn build(self) -> Result<SteamUser, SteamUserError>
pub fn build(self) -> Result<SteamUser, SteamUserError>
Build the SteamUser. Validates inputs and constructs all three
HTTP clients (Steam, no-redirect Steam, external).
Trait Implementations§
Source§impl Debug for SteamUserBuilder
impl Debug for SteamUserBuilder
Source§impl Default for SteamUserBuilder
impl Default for SteamUserBuilder
Source§fn default() -> SteamUserBuilder
fn default() -> SteamUserBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SteamUserBuilder
impl RefUnwindSafe for SteamUserBuilder
impl Send for SteamUserBuilder
impl Sync for SteamUserBuilder
impl Unpin for SteamUserBuilder
impl UnsafeUnpin for SteamUserBuilder
impl UnwindSafe for SteamUserBuilder
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().