[−][src]Struct brawlhalla::ConnectionBuilder
Builder struct for an APIConnection.
You would use it like this:
extern crate brawlhalla; use brawlhalla::ConnectionBuilder; #[tokio::main] async fn main() -> Result<(), brawlhalla::APIError> { let steamid: u64 = 42069; ConnectionBuilder::default() .with_apikey("your_apikey") .build() .search_by_steam_id(steamid) .await?; println!("{}", steamid); Ok(()) }
Methods
impl<'a> ConnectionBuilder<'a>
[src]
pub fn with_apikey(self, apikey: &'a str) -> Self
[src]
Configures an API Key for your builder
pub fn with_apiurl(self, apiurl: &'a str) -> Self
[src]
Configures the API URL for the builder. You will probably never need this function.
pub fn build(self) -> APIConnection
[src]
Builds an APIConnection struct from your builder.
pub fn new(apikey: &'a str, apiurl: &'a str) -> Self
[src]
This constructor is probably not what you want, use ConnectionBuilder::default()
instead.
Creates a builder struct with a custom API URL. This allows you to call any API that works like the official Brawlhalla API.
Trait Implementations
impl<'a> Default for ConnectionBuilder<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for ConnectionBuilder<'a>
impl<'a> Send for ConnectionBuilder<'a>
impl<'a> Sync for ConnectionBuilder<'a>
impl<'a> Unpin for ConnectionBuilder<'a>
impl<'a> UnwindSafe for ConnectionBuilder<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,