Enum sequoia_ipc::IPCPolicy
source · [−]pub enum IPCPolicy {
External,
Internal,
Robust,
}
Expand description
IPC policy for Sequoia.
With this policy you can control how Sequoia starts background servers.
Variants
External
External background servers only.
We will always use external background servers. If starting one fails, the operation will fail.
The advantage is that we never spawn a thread.
The disadvantage is that we need to locate the background
server to start. If you are distribute Sequoia with your
application, make sure to include the binaries, and to
configure the Context so that context.lib()
points to the
directory containing the binaries.
Internal
Internal background servers only.
We will always use internal background servers. It is very unlikely that this fails.
The advantage is that this method is very robust. If you
distribute Sequoia with your application, you do not need to
ship the binary, and it does not matter what context.lib()
points to. This is very robust and convenient.
The disadvantage is that we spawn a thread in your
application. Threads may play badly with fork(2)
, file
handles, and locks. If you are not doing anything fancy,
however, and only use fork-then-exec, you should be okay.
Robust
Prefer external, fall back to internal.
We will first try to use an external background server, but fall back on an internal one should that fail.
The advantage is that if Sequoia is properly set up to find the background servers, we will use these and get the advantages of that approach. Because we fail back on using an internal server, we gain the robustness of that approach.
The disadvantage is that we may or may not spawn a thread in
your application. If this is unacceptable in your
environment, use the External
policy.
Trait Implementations
impl Copy for IPCPolicy
impl StructuralPartialEq for IPCPolicy
Auto Trait Implementations
impl RefUnwindSafe for IPCPolicy
impl Send for IPCPolicy
impl Sync for IPCPolicy
impl Unpin for IPCPolicy
impl UnwindSafe for IPCPolicy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more