pub struct RawSocketHandle { /* private fields */ }Implementations§
Source§impl RawSocketHandle
impl RawSocketHandle
pub fn new(protocol: RawSocketProtocol) -> Result<RawSocketHandle>
pub fn bound_to_interface( interface: &str, protocol: RawSocketProtocol, ) -> Result<Self>
pub fn bind_to_interface(&mut self, interface: &str) -> Result<()>
pub fn mtu_of_interface(&mut self, interface: &str) -> Result<usize>
pub fn recv(&self, buffer: &mut [u8]) -> Result<usize>
pub fn send(&self, buffer: &[u8]) -> Result<usize>
Trait Implementations§
Source§impl AsRawFd for RawSocketHandle
impl AsRawFd for RawSocketHandle
Source§impl Debug for RawSocketHandle
impl Debug for RawSocketHandle
Source§impl Drop for RawSocketHandle
impl Drop for RawSocketHandle
Source§impl IntoRawFd for RawSocketHandle
impl IntoRawFd for RawSocketHandle
Source§fn into_raw_fd(self) -> RawFd
fn into_raw_fd(self) -> RawFd
Consumes this object, returning the raw underlying file descriptor. Read more
Auto Trait Implementations§
impl Freeze for RawSocketHandle
impl RefUnwindSafe for RawSocketHandle
impl Send for RawSocketHandle
impl Sync for RawSocketHandle
impl Unpin for RawSocketHandle
impl UnwindSafe for RawSocketHandle
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> 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>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request