Struct wasi_cap_std_sync::file::File
source · pub struct File(_);
Implementations
sourceimpl File
impl File
pub fn from_cap_std(file: File) -> Self
Trait Implementations
sourceimpl AsHandle for File
impl AsHandle for File
sourcefn as_handle(&self) -> BorrowedHandle<'_>
fn as_handle(&self) -> BorrowedHandle<'_>
Borrows the handle. Read more
sourceimpl AsRawHandleOrSocket for File
impl AsRawHandleOrSocket for File
sourcefn as_raw_handle_or_socket(&self) -> RawHandleOrSocket
fn as_raw_handle_or_socket(&self) -> RawHandleOrSocket
Like
AsRawHandle::as_raw_handle
and AsRawSocket::as_raw_socket
but can return either type. Read moresourceimpl WasiFile for File
impl WasiFile for File
fn as_any(&self) -> &dyn Any
fn pollable(&self) -> Option<RawHandleOrSocket>
fn datasync<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn sync<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_filetype<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<FileType, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_fdflags<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<FdFlags, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn set_fdflags<'life0, 'async_trait>(
&'life0 mut self,
fdflags: FdFlags
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_filestat<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Filestat, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn set_filestat_size<'life0, 'async_trait>(
&'life0 mut self,
size: u64
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn advise<'life0, 'async_trait>(
&'life0 mut self,
offset: u64,
len: u64,
advice: Advice
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn allocate<'life0, 'async_trait>(
&'life0 mut self,
offset: u64,
len: u64
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn set_times<'life0, 'async_trait>(
&'life0 mut self,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn read_vectored<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
bufs: &'life1 mut [IoSliceMut<'a>]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn read_vectored_at<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
bufs: &'life1 mut [IoSliceMut<'a>],
offset: u64
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn write_vectored<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
bufs: &'life1 [IoSlice<'a>]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn write_vectored_at<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
bufs: &'life1 [IoSlice<'a>],
offset: u64
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn seek<'life0, 'async_trait>(
&'life0 mut self,
pos: SeekFrom
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn peek<'life0, 'life1, 'async_trait>(
&'life0 mut self,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn num_ready_bytes<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn isatty(&mut self) -> bool
fn sock_accept<'life0, 'async_trait>(
&'life0 mut self,
_fdflags: FdFlags
) -> Pin<Box<dyn Future<Output = Result<Box<dyn WasiFile + 'static, Global>, Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fn sock_recv<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
_ri_data: &'life1 mut [IoSliceMut<'a>],
_ri_flags: RiFlags
) -> Pin<Box<dyn Future<Output = Result<(u64, RoFlags), Error>> + Send + 'async_trait, Global>>where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn sock_send<'a, 'life0, 'life1, 'async_trait>(
&'life0 mut self,
_si_data: &'life1 [IoSlice<'a>],
_si_flags: SiFlags
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait, Global>>where
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn sock_shutdown<'life0, 'async_trait>(
&'life0 mut self,
_how: SdFlags
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fn readable<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
fn writable<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Self: 'async_trait,
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
sourceimpl<T> AsFilelike for Twhere
T: AsHandle,
impl<T> AsFilelike for Twhere
T: AsHandle,
sourcefn as_filelike(&self) -> BorrowedHandle<'_>
fn as_filelike(&self) -> BorrowedHandle<'_>
Borrows the reference. Read more
sourcefn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target>where
Target: FilelikeViewType,
fn as_filelike_view<Target>(&self) -> FilelikeView<'_, Target>where
Target: FilelikeViewType,
Return a borrowing view of a resource which dereferences to a
&Target
. Read moresourceimpl<T> AsRawGrip for Twhere
T: AsRawHandleOrSocket,
impl<T> AsRawGrip for Twhere
T: AsRawHandleOrSocket,
sourcefn as_raw_grip(&self) -> RawHandleOrSocket
fn as_raw_grip(&self) -> RawHandleOrSocket
Extracts the raw grip.
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
sourcefn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self
file descriptor.sourcefn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike + FromFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike + FromFilelike,
sourcefn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
Set the “status” flags for the
self
file descriptor. Read moresourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<Stream> IsTerminal for Streamwhere
Stream: AsFilelike,
impl<Stream> IsTerminal for Streamwhere
Stream: AsFilelike,
sourcefn is_terminal(&self) -> bool
fn is_terminal(&self) -> bool
Returns true if this is a terminal. Read more
sourceimpl<T> SetTimes for Twhere
T: AsFilelike,
impl<T> SetTimes for Twhere
T: AsFilelike,
sourcefn set_times(
&self,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Result<(), Error>
fn set_times(
&self,
atime: Option<SystemTimeSpec>,
mtime: Option<SystemTimeSpec>
) -> Result<(), Error>
Set the last access and last modification timestamps of an open file
handle. Read more