pub struct Signald { /* private fields */ }Implementations§
Source§impl Signald
impl Signald
Sourcepub fn connect_path(socket_path: &str) -> Self
pub fn connect_path(socket_path: &str) -> Self
Connect to a custom Signald socket
Sourcepub fn send_request(&mut self, request: &SignaldRequest)
pub fn send_request(&mut self, request: &SignaldRequest)
Send a signald request on the socket
Sourcepub async fn send(
&mut self,
username: String,
recipient_number: String,
message_body: Option<String>,
)
pub async fn send( &mut self, username: String, recipient_number: String, message_body: Option<String>, )
Send a message to the socket
Sourcepub async fn subscribe(
&mut self,
username: String,
) -> Result<SignaldResponse, RecvTimeoutError>
pub async fn subscribe( &mut self, username: String, ) -> Result<SignaldResponse, RecvTimeoutError>
Enable receiving user events such as received messages
Sourcepub async fn unsubscribe(
&mut self,
username: String,
) -> Result<SignaldResponse, RecvTimeoutError>
pub async fn unsubscribe( &mut self, username: String, ) -> Result<SignaldResponse, RecvTimeoutError>
Disable receiving user events such as received messages
Sourcepub async fn link(&mut self) -> Result<SignaldResponse, RecvTimeoutError>
pub async fn link(&mut self) -> Result<SignaldResponse, RecvTimeoutError>
Link an existing signal account
Sourcepub async fn version(&mut self) -> Result<SignaldResponse, RecvTimeoutError>
pub async fn version(&mut self) -> Result<SignaldResponse, RecvTimeoutError>
Get the current signald version
Sourcepub async fn list_contacts(
&mut self,
username: String,
) -> Result<SignaldResponse, RecvTimeoutError>
pub async fn list_contacts( &mut self, username: String, ) -> Result<SignaldResponse, RecvTimeoutError>
Query all the user’s contacts
Sourcepub fn sync_contacts(&mut self, username: String)
pub fn sync_contacts(&mut self, username: String)
Send a contact sync request to the other devices on this account
Sourcepub fn get_rx(&mut self) -> BusReader<SignaldResponse>
pub fn get_rx(&mut self) -> BusReader<SignaldResponse>
Get a response stream that returns every received message on the socket
Auto Trait Implementations§
impl Freeze for Signald
impl RefUnwindSafe for Signald
impl Send for Signald
impl Sync for Signald
impl Unpin for Signald
impl UnwindSafe for Signald
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