pub trait UpcastArcNetDirProvider {
// Required method
fn upcast_arc<'a>(self: Arc<Self>) -> Arc<dyn NetDirProvider + 'a>
where Self: 'a;
}
Expand description
Helper trait: allows any Arc<X>
to be upcast to a Arc<dyn NetDirProvider>
if X is an implementation or supertrait of NetDirProvider.
This trait exists to work around a limitation in rust: when trait upcasting coercion is stable, this will be unnecessary.
The Rust tracking issue is https://github.com/rust-lang/rust/issues/65991.
Required Methods§
Sourcefn upcast_arc<'a>(self: Arc<Self>) -> Arc<dyn NetDirProvider + 'a>where
Self: 'a,
fn upcast_arc<'a>(self: Arc<Self>) -> Arc<dyn NetDirProvider + 'a>where
Self: 'a,
Return a view of this object as an Arc<dyn NetDirProvider>