Enum kvarn_extensions::connection::Connection
source · [−]pub enum Connection {
Tcp(SocketAddr),
Udp(SocketAddr),
UnixSocket(&'static Path),
}
Available on crate feature
connection
only.Variants
Tcp(SocketAddr)
Udp(SocketAddr)
Keep in mind, this currently has a 60s
timeout.
Please use Self::UnixSocket
s instead if you are on Unix.
UnixSocket(&'static Path)
Available on Unix only.
Implementations
sourceimpl Connection
impl Connection
pub async fn establish(self) -> Result<EstablishedConnection>
Trait Implementations
sourceimpl Clone for Connection
impl Clone for Connection
sourcefn clone(&self) -> Connection
fn clone(&self) -> Connection
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
sourceimpl Debug for Connection
impl Debug for Connection
impl Copy for Connection
Auto Trait Implementations
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more