pub struct BotBuilder<'a, 'b, 'c, S: Send + Sync + ?Sized + 'static> { /* private fields */ }Implementations§
Source§impl<'a, 'b, 'c> BotBuilder<'a, 'b, 'c, ()>
impl<'a, 'b, 'c> BotBuilder<'a, 'b, 'c, ()>
Source§impl<S: Send + Sync + ?Sized + 'static> BotBuilder<'_, '_, '_, S>
impl<S: Send + Sync + ?Sized + 'static> BotBuilder<'_, '_, '_, S>
pub fn host(self, host_info: HostInfo) -> Self
Sourcepub fn user_agent(self, user_agent: &'static str) -> Self
pub fn user_agent(self, user_agent: &'static str) -> Self
Defaults to racetime-rs/0.35.3.
Sourcepub fn scan_races_every(self, scan_races_every: UDuration) -> Self
pub fn scan_races_every(self, scan_races_every: UDuration) -> Self
According to https://github.com/racetimeGG/racetime-app/issues/217#issuecomment-2915924787 this can be set as low as 5 seconds without hitting rate limits. Defaults to 30 seconds.
Sourcepub fn network_timeout(self, network_timeout: Option<UDuration>) -> Self
pub fn network_timeout(self, network_timeout: Option<UDuration>) -> Self
Consider it an error if any network operation (HTTP request or WebSocket write) takes longer than this.
After a WebSocket read is silent for this long, the bot sends one liveness probe. If the connection remains silent for another interval, it reconnects. No probes are sent while the server’s normal keepalive messages are arriving. Defaults to 1 hour.
pub async fn build(self) -> Result<Bot<S>, AuthError>
Auto Trait Implementations§
impl<'a, 'b, 'c, S> Freeze for BotBuilder<'a, 'b, 'c, S>
impl<'a, 'b, 'c, S> RefUnwindSafe for BotBuilder<'a, 'b, 'c, S>
impl<'a, 'b, 'c, S> Send for BotBuilder<'a, 'b, 'c, S>
impl<'a, 'b, 'c, S> Sync for BotBuilder<'a, 'b, 'c, S>
impl<'a, 'b, 'c, S> Unpin for BotBuilder<'a, 'b, 'c, S>
impl<'a, 'b, 'c, S> UnsafeUnpin for BotBuilder<'a, 'b, 'c, S>
impl<'a, 'b, 'c, S> UnwindSafe for BotBuilder<'a, 'b, 'c, S>
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 more