logo
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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.