pub trait FileDescriptionExt: 'static {
// Required methods
fn into_rc_any(self: FileDescriptionRef<Self>) -> Rc<dyn Any>;
fn close_ref<'tcx>(
self: FileDescriptionRef<Self>,
communicate_allowed: bool,
ecx: &mut MiriInterpCx<'tcx>,
) -> InterpResult<'tcx, Result<()>>;
}
Expand description
A helper trait to indirectly allow downcasting on Rc<FdIdWith<dyn _>>
.
Ideally we’d just add a FdIdWith<Self>: Any
bound to the FileDescription
trait,
but that does not allow upcasting.
Required Methods§
fn into_rc_any(self: FileDescriptionRef<Self>) -> Rc<dyn Any>
Sourcefn close_ref<'tcx>(
self: FileDescriptionRef<Self>,
communicate_allowed: bool,
ecx: &mut MiriInterpCx<'tcx>,
) -> InterpResult<'tcx, Result<()>>
fn close_ref<'tcx>( self: FileDescriptionRef<Self>, communicate_allowed: bool, ecx: &mut MiriInterpCx<'tcx>, ) -> InterpResult<'tcx, Result<()>>
We wrap the regular close
function generically, so both handle Rc::into_inner
and epoll interest management.