pub struct ConfigBuilder { /* private fields */ }Implementations§
Source§impl ConfigBuilder
impl ConfigBuilder
Sourcepub fn client(self, client: Client) -> ConfigBuilder
pub fn client(self, client: Client) -> ConfigBuilder
Set the Surf client to use for HTTP requests. Defaults to
Sourcepub fn minecraft_api_type(self, minecraft_api_type: ApiType) -> ConfigBuilder
pub fn minecraft_api_type(self, minecraft_api_type: ApiType) -> ConfigBuilder
Set API for username and uuid conversions. Defaults to ApiType::Mojang.
Sourcepub fn rate_limit_strategy(
self,
rate_limit_strategy: RateLimitStrategy,
) -> ConfigBuilder
pub fn rate_limit_strategy( self, rate_limit_strategy: RateLimitStrategy, ) -> ConfigBuilder
Set how Hypixle API rate limits should be handled. Defaults to RateLimitStrategy::Delay.
Sourcepub fn minecraft_cache_ttl(self, minecraft_cache_ttl: Duration) -> ConfigBuilder
pub fn minecraft_cache_ttl(self, minecraft_cache_ttl: Duration) -> ConfigBuilder
Set the time to live for uuid and username caches. A TTL must be set to enable caching.
Sourcepub fn add_hypixel_cache_ttl(
self,
endpoint: HypixelEndpoint,
ttl: Duration,
) -> ConfigBuilder
pub fn add_hypixel_cache_ttl( self, endpoint: HypixelEndpoint, ttl: Duration, ) -> ConfigBuilder
Set the time to live for Hypixel API caching. Only endpoints with a TTL set will be cached.
Trait Implementations§
Source§impl Default for ConfigBuilder
impl Default for ConfigBuilder
Source§fn default() -> ConfigBuilder
fn default() -> ConfigBuilder
Returns the “default value” for a type. Read more
Source§impl From<ConfigBuilder> for Config
impl From<ConfigBuilder> for Config
Source§fn from(c: ConfigBuilder) -> Self
fn from(c: ConfigBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ConfigBuilder
impl !RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl !UnwindSafe for ConfigBuilder
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