Struct roboat::ClientBuilder
source · pub struct ClientBuilder { /* private fields */ }Expand description
A builder used for constructing a Client. Constructed using ClientBuilder::new.
Implementations§
source§impl ClientBuilder
impl ClientBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new ClientBuilder.
sourcepub fn roblosecurity(self, roblosecurity: String) -> Self
pub fn roblosecurity(self, roblosecurity: String) -> Self
Sets the roblosecurity for the client.
Example
use roboat::ClientBuilder;
const ROBLOSECURITY: &str = "roblosecurity";
let client = ClientBuilder::new().roblosecurity(ROBLOSECURITY.to_string()).build();sourcepub fn reqwest_client(self, reqwest_client: Client) -> Self
pub fn reqwest_client(self, reqwest_client: Client) -> Self
Sets the reqwest::Client for the client.
Example
use roboat::ClientBuilder;
let reqwest_client = reqwest::Client::new();
let client = ClientBuilder::new().reqwest_client(reqwest_client).build();Trait Implementations§
source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ClientBuilder
impl Debug for ClientBuilder
source§impl Default for ClientBuilder
impl Default for ClientBuilder
source§fn default() -> ClientBuilder
fn default() -> ClientBuilder
Returns the “default value” for a type. Read more