Struct libsignal_service::websocket::SignalWebSocket
source · pub struct SignalWebSocket { /* private fields */ }
Expand description
A dispatching web socket client for the Signal web socket API.
This structure can be freely cloned, since this acts as a facade for multiple entry and exit points.
Implementations§
source§impl SignalWebSocket
impl SignalWebSocket
pub async fn get_attachment_v2_upload_attributes( &mut self, ) -> Result<AttachmentV2UploadAttributes, ServiceError>
source§impl SignalWebSocket
impl SignalWebSocket
pub async fn send_messages( &mut self, messages: OutgoingPushMessages, ) -> Result<SendMessageResponse, ServiceError>
pub async fn send_messages_unidentified( &mut self, messages: OutgoingPushMessages, access: &UnidentifiedAccess, ) -> Result<SendMessageResponse, ServiceError>
source§impl SignalWebSocket
impl SignalWebSocket
pub fn from_socket<WS: WebSocketService + 'static>( ws: WS, stream: WS::Stream, keep_alive_path: String, ) -> (Self, impl Future<Output = ()>)
pub fn is_closed(&self) -> bool
pub fn is_used(&self) -> bool
pub async fn with_request_stream<R: 'static, F: FnOnce(&mut SignalRequestStream) -> R>( &mut self, f: F, ) -> R
pub fn request( &mut self, r: WebSocketRequestMessage, ) -> impl Future<Output = Result<WebSocketResponseMessage, ServiceError>>
Trait Implementations§
source§impl Clone for SignalWebSocket
impl Clone for SignalWebSocket
source§fn clone(&self) -> SignalWebSocket
fn clone(&self) -> SignalWebSocket
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SignalWebSocket
impl !RefUnwindSafe for SignalWebSocket
impl Send for SignalWebSocket
impl Sync for SignalWebSocket
impl Unpin for SignalWebSocket
impl !UnwindSafe for SignalWebSocket
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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