pub struct SlackClient<T: HttpClient> { /* private fields */ }
Expand description
Represents a Slack client that interacts with the Slack API using the provided HTTP client.
Implementations§
Source§impl<T: HttpClient> SlackClient<T>
impl<T: HttpClient> SlackClient<T>
Sourcepub fn new(token: String, client: T) -> SlackClient<T>
pub fn new(token: String, client: T) -> SlackClient<T>
Sourcepub fn send_message(
&self,
channel: &str,
text: &str,
) -> Result<(), SlackClientError>
pub fn send_message( &self, channel: &str, text: &str, ) -> Result<(), SlackClientError>
Sourcepub fn get_messages(
&self,
channel: &str,
) -> Result<Vec<Message>, SlackClientError>
pub fn get_messages( &self, channel: &str, ) -> Result<Vec<Message>, SlackClientError>
Sourcepub fn get_channels(&self) -> Result<Vec<Channel>, SlackClientError>
pub fn get_channels(&self) -> Result<Vec<Channel>, SlackClientError>
Retrieves a list of Slack channels.
§Returns
Returns a vector of Channel
on success, or an error of type SlackClientError
on failure.
Auto Trait Implementations§
impl<T> Freeze for SlackClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for SlackClient<T>where
T: RefUnwindSafe,
impl<T> Send for SlackClient<T>where
T: Send,
impl<T> Sync for SlackClient<T>where
T: Sync,
impl<T> Unpin for SlackClient<T>where
T: Unpin,
impl<T> UnwindSafe for SlackClient<T>where
T: UnwindSafe,
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