Skip to main content

CapabilityBound

Trait CapabilityBound 

Source
pub trait CapabilityBound:
    Send
    + Sync
    + 'static {
    // Required method
    fn debug_typename() -> &'static str;

    // Provided method
    fn try_into_directory_entry(
        self: Arc<Self>,
        _scope: ExecutionScope,
        _token: Arc<WeakInstanceToken>,
    ) -> Result<Arc<dyn DirectoryEntry>, ConversionError> { ... }
}
Expand description

Parent trait implemented by all capability types. Useful for defining interfaces that generic over a capability type.

Required Methods§

Source

fn debug_typename() -> &'static str

Provided Methods§

Source

fn try_into_directory_entry( self: Arc<Self>, _scope: ExecutionScope, _token: Arc<WeakInstanceToken>, ) -> Result<Arc<dyn DirectoryEntry>, ConversionError>

Converts this capability into a directory entry.

This is on the “main” capability trait because this is something supported by (almost) every capability type, and all capability types are expected to either support this or be able to report that they cannot (i.e. return an error when this is called).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§