Struct wasmer_vfs::host_fs::File

source ·
pub struct File {
    pub inner: File,
    pub host_path: PathBuf,
}
Expand description

A thin wrapper around std::fs::File

Fields§

§inner: File§host_path: PathBuf

Implementations§

creates a new host file from a std::fs::File and a path

Trait Implementations§

Formats the value using the given formatter. Read more
Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
Read all bytes until EOF in this source, placing them into buf. Read more
Read all bytes until EOF in this source, appending them to buf. Read more
Read the exact number of bytes required to fill buf. Read more
Like read, except that it reads into a slice of buffers. Read more
🔬This is a nightly-only experimental API. (can_vector)
Determines if this Reader has an efficient read_vectored implementation. Read more
🔬This is a nightly-only experimental API. (read_buf)
Pull some bytes from this source into the specified buffer. Read more
🔬This is a nightly-only experimental API. (read_buf)
Read the exact number of bytes required to fill cursor. Read more
Creates a “by reference” adaptor for this instance of Read. Read more
Transforms this Read instance to an Iterator over its bytes. Read more
Creates an adapter which will chain this stream with another. Read more
Creates an adapter which will read at most limit bytes from it. Read more
Seek to an offset, in bytes, in a stream. Read more
Rewind to the beginning of a stream. Read more
🔬This is a nightly-only experimental API. (seek_stream_len)
Returns the length of this stream (in bytes). Read more
Returns the current seek position from the start of the stream. Read more
the last time the file was accessed in nanoseconds as a UNIX timestamp
the last time the file was modified in nanoseconds as a UNIX timestamp
the time at which the file was created in nanoseconds as a UNIX timestamp
the size of the file in bytes
Change the size of the file, if the new_size is greater than the current size the extra bytes will be allocated and zeroed
Request deletion of the file
Store file contents and metadata to disk Default implementation returns Ok(()). You should implement this method if you care about flushing your cache to permanent storage
Returns the number of bytes available. This function must not block
Returns the number of bytes available. This function must not block Defaults to None which means the number of bytes is unknown
Returns the number of bytes available. This function must not block Defaults to None which means the number of bytes is unknown
Indicates if the file is opened or closed. This function must not block Defaults to a status of being constantly open
Used for polling. Default returns None because this method cannot be implemented for most types Returns the underlying host fd
Write a buffer into this writer, returning how many bytes were written. Read more
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
Attempts to write an entire buffer into this writer. Read more
Writes a formatted string into this writer, returning any error encountered. Read more
Like write, except that it writes from a slice of buffers. Read more
🔬This is a nightly-only experimental API. (can_vector)
Determines if this Writer has an efficient write_vectored implementation. Read more
🔬This is a nightly-only experimental API. (write_all_vectored)
Attempts to write multiple buffers into this writer. Read more
Creates a “by reference” adapter for this instance of Write. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more