pub struct NamedMessageChannel<T, R>where
T: Serialize,
R: for<'de> Deserialize<'de>,{ /* private fields */ }
Expand description
A channel which can be established by sending an automatically generated unique name to another process.
§Security
It depends by platforms, but generally at the very least any other process running under
the same user will be able to open this channel instead of the desired process. This method
is also not suitable for cooperative processes running with diminished permissions. It is best
to send channels to child processes at creation, and to negotiate any further channels over
those initial ones. The two sides of a PreMessageChannel
can be sent freely over a network
of parent-child channels if need be.
Implementations§
Source§impl<T, R> NamedMessageChannel<T, R>where
T: Serialize,
R: for<'de> Deserialize<'de>,
impl<T, R> NamedMessageChannel<T, R>where
T: Serialize,
R: for<'de> Deserialize<'de>,
pub fn new(tokio_loop: &TokioHandle, max_message_size: usize) -> Result<Self>
pub fn name(&self) -> &OsStr
pub fn accept(self, timeout: Option<Duration>) -> Result<MessageChannel<T, R>>
pub fn connect<N>( name: N, timeout: Option<Duration>, tokio_loop: &TokioHandle, max_message_size: usize, ) -> Result<MessageChannel<T, R>>
Auto Trait Implementations§
impl<T, R> Freeze for NamedMessageChannel<T, R>
impl<T, R> !RefUnwindSafe for NamedMessageChannel<T, R>
impl<T, R> Send for NamedMessageChannel<T, R>
impl<T, R> Sync for NamedMessageChannel<T, R>
impl<T, R> Unpin for NamedMessageChannel<T, R>
impl<T, R> !UnwindSafe for NamedMessageChannel<T, R>
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