Struct dogehouse_rs::Client [−][src]
pub struct Client<'a, T> where
T: EventHandler + Sync, { /* fields omitted */ }
Implementations
impl<'a, T> Client<'a, T> where
T: EventHandler + Sync,
[src]
impl<'a, T> Client<'a, T> where
T: EventHandler + Sync,
[src]pub fn new(token: String, refresh_token: String) -> Self
[src]
pub async fn use_create_bot(
&mut self,
username: &'a str,
show_bot_tokens: bool
) -> Result<()>
[src]
pub async fn use_create_bot(
&mut self,
username: &'a str,
show_bot_tokens: bool
) -> Result<()>
[src]In order to create a bot make sure to first authenticate with your normal tokens and create a client
let mut client = Client::new( token, refresh_token ).add_event_handler(Handler);
Then call use_create_bot on client with a username and a boolean value to tell dogehouse-rs if you want your bot tokens to be shown. use_create_bot is an async function so make sure to use await or a blocking call.
client.use_create_bot("bot_name", true").await?;
pub fn add_event_handler(self, handler: T) -> Self
[src]
pub fn add_event_handler(self, handler: T) -> Self
[src]Let user assign an event handler that implements EventHandler trait
pub async fn start(&mut self, room_id: &'a str) -> Result<()>
[src]
Trait Implementations
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for Client<'a, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, T> Send for Client<'a, T> where
T: Send,
T: Send,
impl<'a, T> Sync for Client<'a, T>
impl<'a, T> Unpin for Client<'a, T> where
T: Unpin,
T: Unpin,
impl<'a, T> UnwindSafe for Client<'a, T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,