pub struct IpcClientConn { /* private fields */ }Expand description
IPC client connection for handling requests and responses.
Implementations§
Source§impl IpcClientConn
impl IpcClientConn
Sourcepub async fn new(
client: NamedPipeClient,
) -> Result<(Self, IpcClientEventStream)>
pub async fn new( client: NamedPipeClient, ) -> Result<(Self, IpcClientEventStream)>
Create a new IpcClientConn and IpcClientEventStream from a connected named pipe client.
Sourcepub const fn window(&mut self, id: u32) -> IpcClientConnWindow<'_>
pub const fn window(&mut self, id: u32) -> IpcClientConnWindow<'_>
Get request interface for a specific window id. The returned interface can be used to send window-specific requests.
Sourcepub const fn surface(&mut self, id: u64) -> IpcClientConnSurface<'_>
pub const fn surface(&mut self, id: u64) -> IpcClientConnSurface<'_>
Get request interface for a specific surface id. The returned interface can be used to send surface-specific requests.
Sourcepub async fn request<T: Requestable>(&mut self, req: T) -> Result<T::Response>
pub async fn request<T: Requestable>(&mut self, req: T) -> Result<T::Response>
Send a request and wait for the response. Returns an error if the connection is closed or the request fails.
Trait Implementations§
Source§impl Drop for IpcClientConn
impl Drop for IpcClientConn
Auto Trait Implementations§
impl !RefUnwindSafe for IpcClientConn
impl !UnwindSafe for IpcClientConn
impl Freeze for IpcClientConn
impl Send for IpcClientConn
impl Sync for IpcClientConn
impl Unpin for IpcClientConn
impl UnsafeUnpin for IpcClientConn
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