trait FileDescriptor: Debug {
fn name(&self) -> &'static str;
fn dup(&mut self) -> Result<Box<dyn FileDescriptor>>;
fn as_file_handle<'tcx>(&self) -> InterpResult<'tcx, &FileHandle> { ... }
fn read<'tcx>(
&mut self,
_communicate_allowed: bool,
_bytes: &mut [u8]
) -> InterpResult<'tcx, Result<usize>> { ... }
fn write<'tcx>(
&self,
_communicate_allowed: bool,
_bytes: &[u8]
) -> InterpResult<'tcx, Result<usize>> { ... }
fn seek<'tcx>(
&mut self,
_communicate_allowed: bool,
_offset: SeekFrom
) -> InterpResult<'tcx, Result<u64>> { ... }
fn close<'tcx>(
self: Box<Self>,
_communicate_allowed: bool
) -> InterpResult<'tcx, Result<i32>> { ... }
fn as_unix_host_fd(&self) -> Option<i32> { ... }
}
Required Methods
Provided Methods
source
fn as_file_handle<'tcx>(&self) -> InterpResult<'tcx, &FileHandle>
sourcefn read<'tcx>(
fn read<'tcx>(
&mut self,
_communicate_allowed: bool,
_bytes: &mut [u8]
) -> InterpResult<'tcx, Result<usize>>
sourcefn write<'tcx>(
fn write<'tcx>(
&self,
_communicate_allowed: bool,
_bytes: &[u8]
) -> InterpResult<'tcx, Result<usize>>
sourcefn seek<'tcx>(
fn seek<'tcx>(
&mut self,
_communicate_allowed: bool,
_offset: SeekFrom
) -> InterpResult<'tcx, Result<u64>>
sourcefn close<'tcx>(
fn close<'tcx>(
self: Box<Self>,
_communicate_allowed: bool
) -> InterpResult<'tcx, Result<i32>>
source