pub struct Channel { /* private fields */ }Expand description
Represents a communication channel with a specific recipient.
Implementations§
Source§impl Channel
impl Channel
Sourcepub async fn send_private_message(&self, message: &str) -> bool
pub async fn send_private_message(&self, message: &str) -> bool
pub async fn send_reaction(&self, reference_id: String, emoji: String) -> bool
pub async fn send_typing_indicator(&self) -> bool
Sourcepub async fn send_private_file(&self, file: Option<AttachmentFile>) -> bool
pub async fn send_private_file(&self, file: Option<AttachmentFile>) -> bool
Sends a private file to the recipient.
This function handles file encryption, uploads the file to a server, and sends a notification to the recipient with the file information.
§Arguments
file- The file to send, wrapped in an Option.
§Returns
true if the file was sent successfully, false otherwise.
Auto Trait Implementations§
impl !Freeze for Channel
impl !RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl !UnwindSafe for Channel
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more