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 duplicate 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
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
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