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
sourceimpl<T> ConnectionHandle<T> where
T: Debug,
impl<T> ConnectionHandle<T> where
T: Debug,
sourcepub fn request(
&mut self,
message: NetlinkMessage<T>,
destination: SocketAddr
) -> Result<impl Stream<Item = NetlinkMessage<T>>, Error<T>>
pub fn request(
&mut 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(
&mut self,
message: NetlinkMessage<T>,
destination: SocketAddr
) -> Result<(), Error<T>>
Trait Implementations
sourceimpl<T: Clone> Clone for ConnectionHandle<T> where
T: Debug,
impl<T: Clone> Clone for ConnectionHandle<T> where
T: Debug,
sourcefn clone(&self) -> ConnectionHandle<T>
fn clone(&self) -> ConnectionHandle<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more