pub struct AsyncFile(/* private fields */);Available on crate feature
fs only.Implementations§
Source§impl AsyncFile
impl AsyncFile
pub async fn close(self) -> Result<()>
pub async fn sync_all(&self) -> Result<()>
pub async fn sync_data(&self) -> Result<()>
pub fn try_unwrap(self) -> StdResult<RawAsyncFile, AsyncFile>
pub fn get_raw_weak(&self) -> Weak<RawAsyncFile>
pub fn options() -> OpenOptions
pub async fn create<P: AsRef<Path>>(path: P) -> Result<AsyncFile>
pub async fn create_new<P: AsRef<Path>>(path: P) -> Result<AsyncFile>
pub async fn open<P: AsRef<Path>>(path: P) -> Result<AsyncFile>
pub async fn metadata(&self) -> Result<Metadata>
pub fn try_clone(&self) -> Result<AsyncFile>
pub async fn set_times(&self, times: FileTimes) -> Result<()>
pub async fn set_modified(&self, time: SystemTime) -> Result<()>
pub async fn set_permissions(&self, perm: Permissions) -> Result<()>
pub async fn set_len(&self, len: u64) -> Result<()>
Trait Implementations§
Source§impl AsFd for AsyncFile
Available on Unix only.
impl AsFd for AsyncFile
Available on Unix only.
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Source§impl AsRef<RawAsyncFile> for AsyncFile
impl AsRef<RawAsyncFile> for AsyncFile
Source§fn as_ref(&self) -> &RawAsyncFile
fn as_ref(&self) -> &RawAsyncFile
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsyncReadOverlapped for AsyncFile
Available on crate feature io only.
impl AsyncReadOverlapped for AsyncFile
Available on crate feature
io only.Source§impl AsyncWrite for AsyncFile
Available on crate feature io only.
impl AsyncWrite for AsyncFile
Available on crate feature
io only.Source§impl AsyncWriteOverlapped for AsyncFile
Available on crate feature io only.
impl AsyncWriteOverlapped for AsyncFile
Available on crate feature
io only.Source§impl Deref for AsyncFile
impl Deref for AsyncFile
Source§type Target = RawAsyncFile
type Target = RawAsyncFile
The resulting type after dereferencing.
Source§fn deref(&self) -> &RawAsyncFile
fn deref(&self) -> &RawAsyncFile
Dereferences the value.
Source§impl From<RawAsyncFile> for AsyncFile
impl From<RawAsyncFile> for AsyncFile
Source§fn from(value: RawAsyncFile) -> Self
fn from(value: RawAsyncFile) -> Self
Converts to this type from the input type.
Source§impl Seek for &AsyncFile
impl Seek for &AsyncFile
Source§fn seek(&mut self, pos: SeekFrom) -> Result<u64>
fn seek(&mut self, pos: SeekFrom) -> Result<u64>
Seek to an offset, in bytes, in a stream. Read more
1.55.0 · Source§fn rewind(&mut self) -> Result<(), Error>
fn rewind(&mut self) -> Result<(), Error>
Rewind to the beginning of a stream. Read more
Source§fn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
🔬This is a nightly-only experimental API. (
seek_stream_len)Returns the length of this stream (in bytes). Read more
Source§impl Seek for AsyncFile
impl Seek for AsyncFile
Source§fn seek(&mut self, pos: SeekFrom) -> Result<u64>
fn seek(&mut self, pos: SeekFrom) -> Result<u64>
Seek to an offset, in bytes, in a stream. Read more
1.55.0 · Source§fn rewind(&mut self) -> Result<(), Error>
fn rewind(&mut self) -> Result<(), Error>
Rewind to the beginning of a stream. Read more
Source§fn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
🔬This is a nightly-only experimental API. (
seek_stream_len)Returns the length of this stream (in bytes). Read more
Auto Trait Implementations§
impl Freeze for AsyncFile
impl RefUnwindSafe for AsyncFile
impl !Send for AsyncFile
impl !Sync for AsyncFile
impl Unpin for AsyncFile
impl UnwindSafe for AsyncFile
Blanket Implementations§
Source§impl<A> AsyncReadExt for Awhere
A: AsyncRead,
impl<A> AsyncReadExt for Awhere
A: AsyncRead,
Source§fn read_appending(
&self,
bytes: BytesMut,
len: usize,
) -> ReadAppending<<A as AsyncRead>::Future> ⓘ
fn read_appending( &self, bytes: BytesMut, len: usize, ) -> ReadAppending<<A as AsyncRead>::Future> ⓘ
Available on crate feature
io only.Source§fn read_all_appending(&self, bytes: BytesMut) -> ReadAllAppending<'_, A> ⓘ
fn read_all_appending(&self, bytes: BytesMut) -> ReadAllAppending<'_, A> ⓘ
Available on crate feature
io only.Source§fn read_to_bytes(&self, len: usize) -> ReadToBytesAt<<A as AsyncRead>::Future> ⓘ
fn read_to_bytes(&self, len: usize) -> ReadToBytesAt<<A as AsyncRead>::Future> ⓘ
Available on crate feature
io only.Source§fn read_all_to_bytes(&self) -> ReadAllToBytes<'_, A> ⓘ
fn read_all_to_bytes(&self) -> ReadAllToBytes<'_, A> ⓘ
Available on crate feature
io only.Source§fn read_exact_to_bytes(&self, len: usize) -> ReadExactToBytes<'_, A> ⓘ
fn read_exact_to_bytes(&self, len: usize) -> ReadExactToBytes<'_, A> ⓘ
Available on crate feature
io only.Source§impl<A> AsyncReadOverlappedExt for Awhere
A: AsyncReadOverlapped,
impl<A> AsyncReadOverlappedExt for Awhere
A: AsyncReadOverlapped,
Source§fn read_exact_at(&self, buf: BytesMut, offset: u64) -> ReadExactAt<'_, A> ⓘ
fn read_exact_at(&self, buf: BytesMut, offset: u64) -> ReadExactAt<'_, A> ⓘ
Available on crate feature
io only.Source§fn read_to_bytes_at(
&self,
len: usize,
offset: u64,
) -> ReadToBytesAt<<A as AsyncReadOverlapped>::Future> ⓘ
fn read_to_bytes_at( &self, len: usize, offset: u64, ) -> ReadToBytesAt<<A as AsyncReadOverlapped>::Future> ⓘ
Available on crate feature
io only.Source§fn read_exact_to_bytes_at(
&self,
len: usize,
offset: u64,
) -> ReadExactToBytesAt<'_, A> ⓘ
fn read_exact_to_bytes_at( &self, len: usize, offset: u64, ) -> ReadExactToBytesAt<'_, A> ⓘ
Available on crate feature
io only.Source§impl<W> AsyncWriteExt for Wwhere
W: AsyncWrite,
impl<W> AsyncWriteExt for Wwhere
W: AsyncWrite,
Source§impl<W> AsyncWriteOverlappedExt for Wwhere
W: AsyncWriteOverlapped,
impl<W> AsyncWriteOverlappedExt for Wwhere
W: AsyncWriteOverlapped,
Source§fn write_all_at(&self, bytes: Bytes, offset: u64) -> WriteAllAt<'_, W> ⓘ
fn write_all_at(&self, bytes: Bytes, offset: u64) -> WriteAllAt<'_, W> ⓘ
Available on crate feature
io only.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