Trait fuchsia_component::directory::AsRefDirectory

source ·
pub trait AsRefDirectory {
    // Required method
    fn as_ref_directory(&self) -> &dyn Directory;
}
Expand description

A trait for types that can vend out a Directory reference.

A new trait is needed because both DirectoryProxy and AsRef are external types. As a result, implementing AsRef<&dyn Directory> for DirectoryProxy is not allowed under coherence rules.

Required Methods§

source

fn as_ref_directory(&self) -> &dyn Directory

Get a Directory reference.

Implementations on Foreign Types§

source§

impl AsRefDirectory for ClientEnd<DirectoryMarker>

source§

impl AsRefDirectory for DirectoryProxy

source§

impl AsRefDirectory for DirectorySynchronousProxy

source§

impl<T: Directory> AsRefDirectory for &T

source§

impl<T: Directory> AsRefDirectory for Box<T>

source§

impl<T: Directory> AsRefDirectory for Arc<T>

Implementors§