pub struct TransformerContext {
pub state: SocketState,
pub address: SocketAddr,
}
Expand description
in socket_transformer
Fields§
§state: SocketState
dial or listen
address: SocketAddr
if dial, remote address; if listen, local address
Implementations§
Source§impl TransformerContext
impl TransformerContext
Sourcepub fn new_listen(address: SocketAddr) -> Self
pub fn new_listen(address: SocketAddr) -> Self
crate a listen context
Sourcepub fn new_dial(address: SocketAddr) -> Self
pub fn new_dial(address: SocketAddr) -> Self
create a dial context
Trait Implementations§
Source§impl Clone for TransformerContext
impl Clone for TransformerContext
Source§fn clone(&self) -> TransformerContext
fn clone(&self) -> TransformerContext
Returns a duplicate 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 moreSource§impl Debug for TransformerContext
impl Debug for TransformerContext
Source§impl PartialEq for TransformerContext
impl PartialEq for TransformerContext
impl Copy for TransformerContext
impl Eq for TransformerContext
impl StructuralPartialEq for TransformerContext
Auto Trait Implementations§
impl Freeze for TransformerContext
impl RefUnwindSafe for TransformerContext
impl Send for TransformerContext
impl Sync for TransformerContext
impl Unpin for TransformerContext
impl UnwindSafe for TransformerContext
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