Struct telexide::client::ClientBuilder [−][src]
pub struct ClientBuilder { /* fields omitted */ }
A builder for the Client
object to make customisation easier
Implementations
impl ClientBuilder
[src]
impl ClientBuilder
[src]pub fn new() -> Self
[src]
Creates a bare builder
pub fn set_webhook(&mut self, webhook: &WebhookOptions) -> &mut Self
[src]
sets the webhook url for the Client
to listen to
pub fn set_framework(&mut self, framework: Arc<Framework>) -> &mut Self
[src]
Sets the framework for your bot to use, please use the
create_framework
macro for creating it
pub fn set_token(&mut self, token: &str) -> &mut Self
[src]
Sets the token to be used in authorizing the API requests of your bot
pub fn set_hyper_client(
&mut self,
client: Client<HttpsConnector<HttpConnector>>
) -> &mut Self
[src]
&mut self,
client: Client<HttpsConnector<HttpConnector>>
) -> &mut Self
Sets the custom hyper client for the APIClient
to use
pub fn set_api_client(&mut self, client: Arc<Box<dyn API + Send>>) -> &mut Self
[src]
Sets the custom API client
pub fn set_allowed_updates(&mut self, allowed: Vec<UpdateType>) -> &mut Self
[src]
Set the list of update types you want your update handlers to handle
pub fn add_allowed_updates(&mut self, allowed: UpdateType) -> &mut Self
[src]
Add an update type to the list of update types you want your update handlers to handle
pub fn remove_allowed_updates(&mut self, denied: &UpdateType) -> &mut Self
[src]
Remove an update type from the list of update types you want your update handlers to handle
pub fn add_handler_func(&mut self, handler: EventHandlerFunc) -> &mut Self
[src]
Adds an EventHandlerFunc
function for handling incoming updates
pub fn add_raw_handler_func(
&mut self,
handler: RawEventHandlerFunc
) -> &mut Self
[src]
&mut self,
handler: RawEventHandlerFunc
) -> &mut Self
Adds an RawEventHandlerFunc
function for handling incoming updates
pub fn build(&mut self) -> Client
[src]
Creates the Client
object from the settings set in the
ClientBuilder
object
Auto Trait Implementations
impl !RefUnwindSafe for ClientBuilder
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl Unpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
impl !UnwindSafe for ClientBuilder
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> UnsafeAny for T where
T: Any,
impl<T> UnsafeAny for T where
T: Any,