Struct sandbox_ipc::PreMessageChannel[][src]

pub struct PreMessageChannel<T, R> where
    T: Serialize,
    R: for<'des> Deserialize<'des>, 
{ /* fields omitted */ }

A sendable handle for establishing MessageChannels with processes you can already communicate with.

PreMessageChannels are created in pairs, and then can be freely sent along any IPC method in this crate capable of transmitting OS resources. When they reach their destination they can be converted into MessageChannels.

Methods

impl<T, R> PreMessageChannel<T, R> where
    T: Serialize,
    R: for<'de> Deserialize<'de>, 
[src]

Creates a MessageChannel from a transmitted pre-channel and a remote process handle.

Security

You should only allow more trusted processes to hold unsealed channels to less trusted processes. On some platforms unsealed channels allow the holder to interfere with the other process.

Using an incorrect remote process handle may cause this function to fail or transmission of OS resources (files, sockets, etc.) accross the channel to fail.

Creates a sealed MessageChannel from a transmitted pre-channel.

Sealed channels cannot transmit OS resources (files, sockets, etc.) but can still transmit data (they may receive OS resources if the other side is unsealed). It is recommended that you use a sealed channel handle when communicating from the less trusted side of a channel.

Trait Implementations

impl<T: Debug, R: Debug> Debug for PreMessageChannel<T, R> where
    T: Serialize,
    R: for<'des> Deserialize<'des>, 
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<T, R> Send for PreMessageChannel<T, R> where
    R: Send,
    T: Send

impl<T, R> Sync for PreMessageChannel<T, R> where
    R: Sync,
    T: Sync