Home
last modified time | relevance | path

Searched refs:OwnedSocket (Results 1 – 11 of 11) sorted by relevance

/third_party/rust/crates/io-lifetimes/src/
Dimpls_mio.rs8 use crate::{AsSocket, BorrowedSocket, FromSocket, IntoSocket, OwnedSocket};
51 fn into_socket(self) -> OwnedSocket { in into_socket() argument
52 unsafe { OwnedSocket::from_raw_socket(self.into_raw_socket()) } in into_socket()
57 impl From<mio::net::TcpStream> for OwnedSocket { implementation
83 fn from_socket(owned: OwnedSocket) -> Self { in from_socket()
89 impl From<OwnedSocket> for mio::net::TcpStream {
91 fn from(owned: OwnedSocket) -> Self { in from()
131 fn into_socket(self) -> OwnedSocket { in into_socket() argument
132 unsafe { OwnedSocket::from_raw_socket(self.into_raw_socket()) } in into_socket()
137 impl From<mio::net::TcpListener> for OwnedSocket { implementation
[all …]
Dimpls_async_std.rs10 IntoSocket, OwnedHandle, OwnedSocket,
138 fn into_socket(self) -> OwnedSocket { in into_socket() argument
139 unsafe { OwnedSocket::from_raw_socket(self.into_raw_socket()) } in into_socket()
144 impl From<async_std::net::TcpStream> for OwnedSocket { implementation
170 fn from_socket(owned: OwnedSocket) -> Self { in from_socket()
176 impl From<OwnedSocket> for async_std::net::TcpStream {
178 fn from(owned: OwnedSocket) -> Self { in from()
218 fn into_socket(self) -> OwnedSocket { in into_socket() argument
219 unsafe { OwnedSocket::from_raw_socket(self.into_raw_socket()) } in into_socket()
224 impl From<async_std::net::TcpListener> for OwnedSocket { implementation
[all …]
Dimpls_socket2.rs8 use crate::{AsSocket, BorrowedSocket, FromSocket, IntoSocket, OwnedSocket};
51 fn into_socket(self) -> OwnedSocket { in into_socket() argument
52 unsafe { OwnedSocket::from_raw_socket(self.into_raw_socket()) } in into_socket()
57 impl From<socket2::Socket> for OwnedSocket { implementation
83 fn from_socket(owned: OwnedSocket) -> Self { in from_socket()
89 impl From<OwnedSocket> for socket2::Socket {
91 fn from(owned: OwnedSocket) -> Self { in from()
Dimpls_std.rs10 use crate::{BorrowedHandle, BorrowedSocket, HandleOrInvalid, OwnedHandle, OwnedSocket};
61 impl AsSocket for OwnedSocket { implementation
85 impl IntoSocket for OwnedSocket { implementation
87 fn into_socket(self) -> OwnedSocket { in into_socket() argument
109 impl FromSocket for OwnedSocket { implementation
111 fn from_socket(owned: OwnedSocket) -> Self { in from_socket()
247 fn into_socket(self) -> OwnedSocket { in into_socket() argument
248 unsafe { OwnedSocket::from_raw_socket(self.into_raw_socket()) } in into_socket()
253 impl From<std::net::TcpStream> for OwnedSocket { implementation
279 fn from_socket(owned: OwnedSocket) -> Self { in from_socket()
[all …]
Dlib.rs64 OwnedHandle, OwnedSocket,
77 NullHandleError, OwnedHandle, OwnedSocket,
138 impl<T: From<OwnedSocket>> FromSocket for T {
140 fn from_socket(owned_socket: OwnedSocket) -> Self { in from_socket()
149 OwnedSocket: From<T>,
152 fn into_socket(self) -> OwnedSocket { in into_socket() argument
Dtraits.rs10 use crate::{OwnedHandle, OwnedSocket};
121 fn into_socket(self) -> OwnedSocket; in into_socket() argument
225 fn from_socket(owned: OwnedSocket) -> Self; in from_socket()
230 fn from_into_socket<Owned: Into<OwnedSocket>>(into_owned: Owned) -> Self in from_into_socket() argument
232 Self: Sized + From<OwnedSocket>, in from_into_socket()
Dtypes.rs104 _phantom: PhantomData<&'socket OwnedSocket>,
266 pub struct OwnedSocket { struct
271 impl OwnedSocket { implementation
303 pub fn try_clone_to_owned(&self) -> std::io::Result<OwnedSocket> { in try_clone_to_owned() argument
327 unsafe { Ok(OwnedSocket::from_raw_socket(socket as _)) } in try_clone_to_owned()
351 let socket = OwnedSocket::from_raw_socket(socket as _); in try_clone_to_owned()
602 impl AsRawSocket for OwnedSocket { implementation
630 impl IntoRawSocket for OwnedSocket { implementation
663 impl FromRawSocket for OwnedSocket { implementation
789 impl Drop for OwnedSocket { implementation
[all …]
Dportability.rs11 use crate::{AsHandle, AsSocket, BorrowedHandle, BorrowedSocket, OwnedHandle, OwnedSocket};
67 pub type OwnedSocketlike = OwnedSocket;
332 pub trait IntoSocketlike: Into<OwnedSocket> {
350 impl<T: Into<OwnedSocket>> IntoSocketlike for T {
501 pub trait FromSocketlike: From<OwnedSocket> {
511 impl<T: From<OwnedSocket>> FromSocketlike for T {
Dviews.rs19 use crate::{OwnedHandle, OwnedSocket};
215 unsafe impl SocketlikeViewType for OwnedSocket {} implementation
/third_party/rust/crates/io-lifetimes/tests/
Dniche-optimizations.rs9 use io_lifetimes::{BorrowedSocket, OwnedSocket};
44 assert_eq!(size_of::<Option<OwnedSocket>>(), size_of::<RawSocket>()); in test_niche_optimizations_socket()
55 assert_eq!(OwnedSocket::from_raw_socket(min).into_raw_socket(), min); in test_niche_optimizations_socket()
56 assert_eq!(OwnedSocket::from_raw_socket(max).into_raw_socket(), max); in test_niche_optimizations_socket()
58 Some(OwnedSocket::from_raw_socket(min)) in test_niche_optimizations_socket()
64 Some(OwnedSocket::from_raw_socket(max)) in test_niche_optimizations_socket()
/third_party/rust/crates/rustix/src/backend/libc/
Dio_lifetimes.rs6 pub use io_lifetimes::{BorrowedSocket as BorrowedFd, OwnedSocket as OwnedFd};