[−][src]Struct winping::Buffer
A buffer for request and reply data.
Fields
request_data: Vec<u8>
Implementations
impl Buffer
[src]
pub const fn new() -> Self
[src]
Creates a new, empty buffer with no request data.
pub const fn with_data(request_data: Vec<u8>) -> Self
[src]
Creates a new buffer with the provided request data.
pub fn reply_data(&self) -> &[u8]
[src]
Gets the reply data from the last ping this buffer was used in. The reply data may be empty if a reuqest was not send with this buffer, or if there was no reply to the sent request.
pub fn responding_ipv4(&self) -> Option<Ipv4Addr>
[src]
Gets the responding Ipv6Addr from the last request this buffer was involved in. Returns None if the last request was v6, the buffer wasn't used in a request, or there was no reply.
pub fn responding_ipv6(&self) -> Option<Ipv6Addr>
[src]
Gets the responding Ipv6Addr from the last request this buffer was involved in. Returns None if the last request was v4, the buffer wasn't used in a request, or there was no reply.
pub fn responding_ip(&self) -> Option<IpAddr>
[src]
Gets the responding IpAddr from the last request this buffer was involved in. Returns None if the buffer wasn't used in a request, or there was no reply.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,