pub struct NativeConnection {
pub fd: i32,
pub write_fd: i32,
pub close_fds: bool,
pub transport_type: NativeTransportType,
pub peer_info: Option<String>,
pub local_info: Option<String>,
stream: Option<NativeConnectionStream>,
}Expand description
Native connection wrapper used by the runtime for TCP and Unix transports.
§Fields
fd: Stored field onNativeConnection.write_fd: Stored field onNativeConnection.close_fds: Stored field onNativeConnection.transport_type: Stored field onNativeConnection.peer_info: Stored field onNativeConnection.local_info: Stored field onNativeConnection.
§Examples
ⓘ
let _ = std::mem::size_of::<pharos_runtime_core::connection::NativeConnection>();§Related
crate::connectionfor constructors, helpers, and neighboring runtime types.
Fields§
§fd: i32§write_fd: i32§close_fds: bool§transport_type: NativeTransportType§peer_info: Option<String>§local_info: Option<String>§stream: Option<NativeConnectionStream>Implementations§
Source§impl NativeConnection
impl NativeConnection
Sourcepub fn metadata_only(
transport_type: NativeTransportType,
peer_info: Option<String>,
local_info: Option<String>,
) -> Self
pub fn metadata_only( transport_type: NativeTransportType, peer_info: Option<String>, local_info: Option<String>, ) -> Self
Performs metadata only.
§Parameters
transport_type: Input consumed by [crate::connection::metadata_only].peer_info: Input consumed by [crate::connection::metadata_only].local_info: Input consumed by [crate::connection::metadata_only].
§Returns
Returns the computed value produced by [crate::connection::metadata_only].
§Examples
ⓘ
let _result = pharos_runtime_core::connection::metadata_only(todo!(), todo!(), todo!());§Related
crate::connectionfor adjacent helpers that share the same runtime surface.
Sourcepub fn from_tcp_stream(stream: TcpStream) -> Self
pub fn from_tcp_stream(stream: TcpStream) -> Self
Performs from TCP stream.
§Parameters
stream: Input consumed by [crate::connection::from_tcp_stream].
§Returns
Returns the computed value produced by [crate::connection::from_tcp_stream].
§Examples
ⓘ
let _result = pharos_runtime_core::connection::from_tcp_stream(todo!());§Related
crate::connectionfor adjacent helpers that share the same runtime surface.
Sourcepub fn from_unix_stream(stream: UnixStream) -> Self
pub fn from_unix_stream(stream: UnixStream) -> Self
Wraps a Unix-domain stream in a NativeConnection.
§Parameters
stream: Input consumed by [crate::connection::from_unix_stream].
§Returns
Returns the computed value produced by [crate::connection::from_unix_stream].
§Examples
ⓘ
let _result = pharos_runtime_core::connection::from_unix_stream(todo!());§Related
crate::connectionfor adjacent helpers that share the same runtime surface.
Auto Trait Implementations§
impl Freeze for NativeConnection
impl RefUnwindSafe for NativeConnection
impl Send for NativeConnection
impl Sync for NativeConnection
impl Unpin for NativeConnection
impl UnsafeUnpin for NativeConnection
impl UnwindSafe for NativeConnection
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