pub struct File(FileDesc);
Tuple Fields§
§0: FileDesc
Implementations§
source§impl File
impl File
pub fn open(path: &Path, opts: &OpenOptions) -> Result<File>
pub fn open_c(path: &CStr, opts: &OpenOptions) -> Result<File>
pub fn file_attr(&self) -> Result<FileAttr>
pub fn fsync(&self) -> Result<()>
pub fn datasync(&self) -> Result<()>
pub fn truncate(&self, size: u64) -> Result<()>
pub fn read(&self, buf: &mut [u8]) -> Result<usize>
pub fn read_vectored(&self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize>
pub fn is_read_vectored(&self) -> bool
pub fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<usize>
pub fn read_buf(&self, cursor: BorrowedCursor<'_>) -> Result<()>
pub fn read_vectored_at( &self, bufs: &mut [IoSliceMut<'_>], offset: u64 ) -> Result<usize>
pub fn write(&self, buf: &[u8]) -> Result<usize>
pub fn write_vectored(&self, bufs: &[IoSlice<'_>]) -> Result<usize>
pub fn is_write_vectored(&self) -> bool
pub fn write_at(&self, buf: &[u8], offset: u64) -> Result<usize>
pub fn write_vectored_at( &self, bufs: &[IoSlice<'_>], offset: u64 ) -> Result<usize>
pub fn flush(&self) -> Result<()>
pub fn seek(&self, pos: SeekFrom) -> Result<u64>
pub fn duplicate(&self) -> Result<File>
pub fn set_permissions(&self, perm: FilePermissions) -> Result<()>
pub fn set_times(&self, times: FileTimes) -> Result<()>
Trait Implementations§
source§impl AsFd for File
impl AsFd for File
source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Auto Trait Implementations§
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more