pub struct Connection { /* private fields */ }Implementations§
Source§impl Connection
impl Connection
pub async fn connect(url: &str) -> Result<Self>
pub async fn send_message<M>(
&self,
emsg: EMsg,
header: &CMsgProtoBufHeader,
body: &M,
) -> Result<()>where
M: Message,
pub async fn request<M>(
&self,
emsg: EMsg,
header: CMsgProtoBufHeader,
body: &M,
) -> Result<Packet>where
M: Message,
Sourcepub async fn send_request<M>(
&self,
emsg: EMsg,
header: CMsgProtoBufHeader,
body: &M,
) -> Result<Receiver<Result<Packet>>>where
M: Message,
pub async fn send_request<M>(
&self,
emsg: EMsg,
header: CMsgProtoBufHeader,
body: &M,
) -> Result<Receiver<Result<Packet>>>where
M: Message,
Send a request and return the response receiver without awaiting it. The caller can release any held locks before awaiting the receiver.
Sourcepub async fn send_request_stream<M>(
&self,
emsg: EMsg,
header: CMsgProtoBufHeader,
body: &M,
) -> Result<(u64, UnboundedReceiver<Result<Packet>>)>where
M: Message,
pub async fn send_request_stream<M>(
&self,
emsg: EMsg,
header: CMsgProtoBufHeader,
body: &M,
) -> Result<(u64, UnboundedReceiver<Result<Packet>>)>where
M: Message,
Send a request whose response may arrive in multiple packets with the
same jobid_target. The caller must call end_stream after it sees the
protocol-level end marker.
pub async fn end_stream(&self, job_id: u64)
pub async fn next_event(&mut self) -> Option<Result<Packet>>
pub async fn set_logged_on( &mut self, steamid: u64, client_session_id: i32, heartbeat_seconds: i32, ) -> Result<()>
Sourcepub fn take_incoming(&mut self) -> UnboundedReceiver<Result<Packet>>
pub fn take_incoming(&mut self) -> UnboundedReceiver<Result<Packet>>
Extract the incoming event receiver so run() can select over it
without holding &mut self. Replaces self.incoming with a dead channel.
pub async fn state_snapshot(&self) -> ConnectionState
pub async fn set_package_ids(&self, package_ids: Vec<u32>)
pub fn license_notify(&self) -> Arc<Notify> ⓘ
pub async fn is_closed(&self) -> bool
Trait Implementations§
Source§impl Debug for Connection
impl Debug for Connection
Source§impl Drop for Connection
impl Drop for Connection
Auto Trait Implementations§
impl !Freeze for Connection
impl !RefUnwindSafe for Connection
impl !UnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnsafeUnpin for Connection
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