pub struct DesktopClient { /* private fields */ }Implementations§
Source§impl DesktopClient
impl DesktopClient
pub fn new(port: u16) -> Result<Self, AppError>
pub fn with_account( port: u16, account: DesktopAccount, ) -> Result<Self, AppError>
Sourcepub async fn needs_debugging_restart(&self) -> bool
pub async fn needs_debugging_restart(&self) -> bool
Only offered by the TUI after a verified no-listener probe on WSL.
Sourcepub async fn restart_with_debugging(&self) -> Result<(), AppError>
pub async fn restart_with_debugging(&self) -> Result<(), AppError>
Called only after the person confirms the restart in the TUI.
pub async fn probe(&self) -> Result<ConnectionMetadata, AppError>
pub async fn chats( &self, limit: u16, cursor: Option<&str>, ) -> Result<Page, AppError>
pub async fn messages( &self, chat: &str, limit: u16, cursor: Option<&str>, ) -> Result<Page, AppError>
Sourcepub async fn send(&self, chat: &str, body: &str) -> Result<Value, AppError>
pub async fn send(&self, chat: &str, body: &str) -> Result<Value, AppError>
Sends one plain-text chat message as the signed-in Teams user. Never retried: a lost answer is reported as unconfirmed, because Teams may already have the message.
Sourcepub async fn send_with_id(
&self,
chat: &str,
body: &str,
id: &str,
) -> Result<Value, AppError>
pub async fn send_with_id( &self, chat: &str, body: &str, id: &str, ) -> Result<Value, AppError>
Uses one preallocated correlation ID. This is not an idempotency/retry key.
Sourcepub async fn delivery(&self, chat: &str, id: &str) -> Result<Value, AppError>
pub async fn delivery(&self, chat: &str, id: &str) -> Result<Value, AppError>
Checks only the newest 50 cached messages; absence is not proof of failure.
Sourcepub async fn send_check(&self) -> Result<(), AppError>
pub async fn send_check(&self) -> Result<(), AppError>
Whether the Teams window that sends messages is reachable; sends nothing.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for DesktopClient
impl !RefUnwindSafe for DesktopClient
impl !UnwindSafe for DesktopClient
impl Send for DesktopClient
impl Sync for DesktopClient
impl Unpin for DesktopClient
impl UnsafeUnpin for DesktopClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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