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§
Sourcefn as_ref_directory(&self) -> &dyn Directory
fn as_ref_directory(&self) -> &dyn Directory
Get a Directory
reference.