pub struct Request { /* private fields */ }
Expand description
Request to send messages
Implementations§
Source§impl Request
impl Request
pub fn new() -> Self
Sourcepub fn add_message(
&mut self,
channel: Channel,
to: &str,
content: &str,
) -> Result<()>
pub fn add_message( &mut self, channel: Channel, to: &str, content: &str, ) -> Result<()>
Adds a new message to the request.
Returns Error::TooManyMessages if the number of messages exceeds the gateway limit of 100 messages per request.
Sourcepub fn message_count(&self) -> usize
pub fn message_count(&self) -> usize
Current number of messages in the request
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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