Struct netlink_proto::ConnectionHandle
source · pub struct ConnectionHandle<T>where
T: Debug,{ /* private fields */ }
Expand description
A handle to pass requests to a Connection
.
Implementations§
source§impl<T> ConnectionHandle<T>where
T: Debug,
impl<T> ConnectionHandle<T>where
T: Debug,
sourcepub fn request(
&self,
message: NetlinkMessage<T>,
destination: SocketAddr
) -> Result<impl Stream<Item = NetlinkMessage<T>>, Error<T>>
pub fn request( &self, message: NetlinkMessage<T>, destination: SocketAddr ) -> Result<impl Stream<Item = NetlinkMessage<T>>, Error<T>>
Send a new request and get the response as a stream of messages. Note that some messages are not part of the response stream:
- acknowledgements: when an acknowledgement is received, the stream is closed
- end of dump messages: similarly, upon receiving an “end of dump” message, the stream is closed
pub fn notify( &self, message: NetlinkMessage<T>, destination: SocketAddr ) -> Result<(), Error<T>>
Trait Implementations§
source§impl<T> Clone for ConnectionHandle<T>
impl<T> Clone for ConnectionHandle<T>
source§fn clone(&self) -> ConnectionHandle<T>
fn clone(&self) -> ConnectionHandle<T>
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<T> !RefUnwindSafe for ConnectionHandle<T>
impl<T> Send for ConnectionHandle<T>where
T: Send,
impl<T> Sync for ConnectionHandle<T>where
T: Send,
impl<T> Unpin for ConnectionHandle<T>
impl<T> !UnwindSafe for ConnectionHandle<T>
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