Struct wasmtime_wasi::virtfs::VecFileContents
source · [−]pub struct VecFileContents { /* private fields */ }
Implementations
sourceimpl VecFileContents
impl VecFileContents
pub fn new() -> VecFileContents
pub fn with_content(content: Vec<u8, Global>) -> VecFileContents
Trait Implementations
sourceimpl FileContents for VecFileContents
impl FileContents for VecFileContents
sourcepub fn max_size(&self) -> u64
pub fn max_size(&self) -> u64
The implementation-defined maximum size of the store corresponding to a FileContents
implementation. Read more
sourcepub fn resize(&mut self, new_size: u64) -> Result<(), Error>
pub fn resize(&mut self, new_size: u64) -> Result<(), Error>
Resize to hold new_size
number of bytes, or error if this is not possible.
sourcepub fn preadv(
&self,
iovs: &mut [IoSliceMut<'_>],
offset: u64
) -> Result<usize, Error>
pub fn preadv(
&self,
iovs: &mut [IoSliceMut<'_>],
offset: u64
) -> Result<usize, Error>
Read from the file from offset
, filling a list of IoSlice
. The returend size must not
be more than the capactiy of iovs
, and must not exceed the limit reported by
self.max_size()
. Read more
sourcepub fn pwritev(
&mut self,
iovs: &[IoSlice<'_>],
offset: u64
) -> Result<usize, Error>
pub fn pwritev(
&mut self,
iovs: &[IoSlice<'_>],
offset: u64
) -> Result<usize, Error>
Write a list of IoSlice
starting at offset
. offset
plus the total size of all iovs
is guaranteed to not exceed max_size
. Implementations must not indicate more bytes have
been written than can be held by iovs
. Read more
Auto Trait Implementations
impl RefUnwindSafe for VecFileContents
impl Send for VecFileContents
impl Sync for VecFileContents
impl Unpin for VecFileContents
impl UnwindSafe for VecFileContents
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more