pub enum Delivery {
NamespacedObject(Path),
NamespaceEntry(Path),
Handle(HandleInfo),
}
Expand description
How to deliver a particular capability from a dict to an Elf process. Broadly speaking, one could either deliver a capability using namespace entries, or using numbered handles.
Variants§
NamespacedObject(Path)
Install the capability as a fuchsia.io
object, within some parent directory serviced by
the framework, and discoverable at a path such as “/svc/foo/bar”.
As a result, a namespace entry will be created in the resulting processargs, corresponding to the parent directory, e.g. “/svc/foo”.
For example, installing a sandbox::Sender
at “/svc/fuchsia.examples.Echo” will
cause the framework to spin up a fuchsia.io/Directory
implementation backing “/svc”,
containing a filesystem object named “fuchsia.examples.Echo”.
Not all capability types are installable as fuchsia.io
objects. A one-shot handle is not
supported because fuchsia.io
does not have a protocol for delivering one-shot handles.
Use Delivery::Handle for those.
NamespaceEntry(Path)
Install the capability as a fuchsia.io
object by creating a namespace entry at the
provided path. The difference between Delivery::NamespacedObject and
Delivery::NamespaceEntry is that the former will create a namespace entry at the parent
directory.
For example, installing a sandbox::Directory
at “/data” will result in a namespace entry
at “/data”. A request will be sent to the capability when the user writes to the
namespace entry.
Handle(HandleInfo)
Installs the Zircon handle representation of this capability at the processargs slot described by HandleInfo.
The following handle types are disallowed because they will collide with the implementation of incoming namespace and outgoing directory: