pub struct IPCTransportImpl {
socket_path: Option<PathBuf>,
pipe_name: Option<String>,
config: TransportConfig,
connected: Arc<RwLock<bool>>,
stats: Arc<RwLock<TransportStats>>,
}Expand description
IPC transport for local process communication
Fields§
§socket_path: Option<PathBuf>Socket path
pipe_name: Option<String>Named pipe name (Windows)
config: TransportConfigTransport configuration
connected: Arc<RwLock<bool>>Connection state
stats: Arc<RwLock<TransportStats>>Transport statistics
Implementations§
Source§impl IPCTransportImpl
impl IPCTransportImpl
Sourcepub fn with_socket_path<P: AsRef<Path>>(socket_path: P) -> Result<Self>
pub fn with_socket_path<P: AsRef<Path>>(socket_path: P) -> Result<Self>
Sourcepub fn with_config(config: TransportConfig) -> Result<Self>
pub fn with_config(config: TransportConfig) -> Result<Self>
Create a new IPC transport with custom configuration
Sourcefn default_socket_path() -> PathBuf
fn default_socket_path() -> PathBuf
Get the default socket path for the current platform
Sourcepub fn socket_path(&self) -> Option<&Path>
pub fn socket_path(&self) -> Option<&Path>
Get the socket path (Unix only)
Sourcepub async fn stats(&self) -> TransportStats
pub async fn stats(&self) -> TransportStats
Get transport statistics
Sourceasync fn cleanup_socket(&self) -> Result<()>
async fn cleanup_socket(&self) -> Result<()>
Clean up the socket file if it exists
Trait Implementations§
Source§impl Clone for IPCTransportImpl
impl Clone for IPCTransportImpl
Source§fn clone(&self) -> IPCTransportImpl
fn clone(&self) -> IPCTransportImpl
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 IPCTransportImpl
impl Debug for IPCTransportImpl
Source§impl TransportStrategy for IPCTransportImpl
impl TransportStrategy for IPCTransportImpl
Source§type Error = IPCTransportError
type Error = IPCTransportError
Error type for this transport
Source§fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connect to the transport endpoint
Source§fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send a request and receive a response
Source§fn send_no_response<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_no_response<'life0, 'life1, 'async_trait>(
&'life0 self,
data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send data without expecting a response (fire and forget)
Source§fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close the transport connection
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Check if the transport is connected
Source§fn transport_type(&self) -> TransportType
fn transport_type(&self) -> TransportType
Get the transport type identifier
Auto Trait Implementations§
impl Freeze for IPCTransportImpl
impl !RefUnwindSafe for IPCTransportImpl
impl Send for IPCTransportImpl
impl Sync for IPCTransportImpl
impl Unpin for IPCTransportImpl
impl !UnwindSafe for IPCTransportImpl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request