pub struct SocketSender { /* private fields */ }Expand description
Raw packet sender with explicit options.
Implementations§
Source§impl SocketSender
impl SocketSender
Sourcepub fn new(options: impl Into<SendOptions>) -> Self
pub fn new(options: impl Into<SendOptions>) -> Self
Create a sender from options.
Sourcepub fn dry_run(interface: impl Into<String>) -> Self
pub fn dry_run(interface: impl Into<String>) -> Self
Create a compile-only sender for an interface.
Sourcepub const fn options(&self) -> &SendOptions
pub const fn options(&self) -> &SendOptions
Borrow this sender’s options.
Sourcepub fn plan(&self, packet: &Packet) -> Result<SendPlan>
pub fn plan(&self, packet: &Packet) -> Result<SendPlan>
Compile a packet and return a send plan without transmitting bytes.
Sourcepub fn send(&self, packet: &Packet) -> Result<SendReport>
pub fn send(&self, packet: &Packet) -> Result<SendReport>
Send a packet or return a dry-run report when configured for dry-run.
Trait Implementations§
Source§impl Clone for SocketSender
impl Clone for SocketSender
Source§fn clone(&self) -> SocketSender
fn clone(&self) -> SocketSender
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SocketSender
impl Debug for SocketSender
impl Eq for SocketSender
Source§impl From<SocketSender> for RawSocketWriter
impl From<SocketSender> for RawSocketWriter
Source§fn from(sender: SocketSender) -> Self
fn from(sender: SocketSender) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SocketSender
impl PartialEq for SocketSender
Source§fn eq(&self, other: &SocketSender) -> bool
fn eq(&self, other: &SocketSender) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SocketSender
Auto Trait Implementations§
impl Freeze for SocketSender
impl RefUnwindSafe for SocketSender
impl Send for SocketSender
impl Sync for SocketSender
impl Unpin for SocketSender
impl UnsafeUnpin for SocketSender
impl UnwindSafe for SocketSender
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