Struct Context

Source
pub struct Context { /* private fields */ }

Implementations§

Source§

impl Context

Source

pub fn new(req_id: String) -> Self

Source

pub fn http_ctx(&mut self) -> &mut HttpContext

get http_ctx

Source

pub fn set_body(&mut self, body: Body) -> u32

set body

Source

pub fn take_body(&mut self, handle: u32) -> Option<Body>

take body

Source

pub fn req_id(&self) -> String

get request id

Trait Implementations§

Source§

impl Default for Context

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl WasiView for Context

Source§

fn table(&self) -> &Table

Source§

fn table_mut(&mut self) -> &mut Table

Source§

fn ctx(&self) -> &WasiCtx

Source§

fn ctx_mut(&mut self) -> &mut WasiCtx

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CompatExt for T

Source§

fn compat(self) -> Compat<T>

Applies the Compat adapter by value. Read more
Source§

fn compat_ref(&self) -> Compat<&T>

Applies the Compat adapter by shared reference. Read more
Source§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the Compat adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GetSetFdFlags for T

Source§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
Source§

fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>
where T: AsFilelike,

Create a new SetFdFlags value for use with set_fd_flags. Read more
Source§

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 more
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn get_environment<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<(String, String)>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Get the POSIX-style environment variables. Read more
Source§

fn get_arguments<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Get the POSIX-style arguments to the program.
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn get_directories<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Vec<(u32, String)>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return the set of of preopened directories, and their path.
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn drop_input_stream<'life0, 'async_trait>( &'life0 mut self, stream: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Dispose of the specified input-stream, after which it may no longer be used.
Source§

fn drop_output_stream<'life0, 'async_trait>( &'life0 mut self, stream: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Dispose of the specified output-stream, after which it may no longer be used.
Source§

fn read<'life0, 'async_trait>( &'life0 mut self, stream: u32, len: u64, ) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, bool), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Read bytes from a stream. Read more
Source§

fn blocking_read<'life0, 'async_trait>( &'life0 mut self, stream: u32, len: u64, ) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, bool), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Read bytes from a stream, with blocking. Read more
Source§

fn write<'life0, 'async_trait>( &'life0 mut self, stream: u32, bytes: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Write bytes to a stream. Read more
Source§

fn blocking_write<'life0, 'async_trait>( &'life0 mut self, stream: u32, bytes: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Write bytes to a stream, with blocking. Read more
Source§

fn skip<'life0, 'async_trait>( &'life0 mut self, stream: u32, len: u64, ) -> Pin<Box<dyn Future<Output = Result<(u64, bool), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Skip bytes from a stream. Read more
Source§

fn blocking_skip<'life0, 'async_trait>( &'life0 mut self, stream: u32, len: u64, ) -> Pin<Box<dyn Future<Output = Result<(u64, bool), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Skip bytes from a stream, with blocking. Read more
Source§

fn write_zeroes<'life0, 'async_trait>( &'life0 mut self, stream: u32, len: u64, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Write multiple zero bytes to a stream. Read more
Source§

fn blocking_write_zeroes<'life0, 'async_trait>( &'life0 mut self, stream: u32, len: u64, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Write multiple zero bytes to a stream, with blocking. Read more
Source§

fn splice<'life0, 'async_trait>( &'life0 mut self, _src: u32, _dst: u32, _len: u64, ) -> Pin<Box<dyn Future<Output = Result<(u64, bool), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Read from one stream and write to another. Read more
Source§

fn blocking_splice<'life0, 'async_trait>( &'life0 mut self, src: u32, dst: u32, len: u64, ) -> Pin<Box<dyn Future<Output = Result<(u64, bool), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Read from one stream and write to another, with blocking. Read more
Source§

fn forward<'life0, 'async_trait>( &'life0 mut self, _src: u32, _dst: u32, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Forward the entire contents of an input stream to an output stream. Read more
Source§

fn subscribe_to_input_stream<'life0, 'async_trait>( &'life0 mut self, stream: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Create a pollable which will resolve once either the specified stream has bytes available to read or the other end of the stream has been closed.
Source§

fn subscribe_to_output_stream<'life0, 'async_trait>( &'life0 mut self, stream: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Create a pollable which will resolve once either the specified stream is ready to accept bytes or the other end of the stream has been closed.
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn drop_pollable<'life0, 'async_trait>( &'life0 mut self, pollable: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Dispose of the specified pollable, after which it may no longer be used.
Source§

fn poll_oneoff<'life0, 'async_trait>( &'life0 mut self, futures: Vec<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Poll for completion on a set of pollables. Read more
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn get_random_bytes<'life0, 'async_trait>( &'life0 mut self, len: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return len cryptographically-secure pseudo-random bytes. Read more
Source§

fn get_random_u64<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return a cryptographically-secure pseudo-random u64 value. Read more
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn get_insecure_random_bytes<'life0, 'async_trait>( &'life0 mut self, len: u64, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return len insecure pseudo-random bytes. Read more
Source§

fn get_insecure_random_u64<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return an insecure pseudo-random u64 value. Read more
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn insecure_seed<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(u64, u64), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return a 128-bit value that may contain a pseudo-random value. Read more
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn exit<'life0, 'async_trait>( &'life0 mut self, status: Result<(), ()>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Exit the curerent instance and any linked instances.
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn get_stdin<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Source§

impl<T> Host for T
where T: WasiView,

Source§

fn get_stdout<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Source§

impl<T> Host for T
where T: WasiView,

Source§

fn get_stderr<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Source§

impl<T> Host for T
where T: WasiView,

Source§

fn now<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Datetime, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Read the current value of the clock. Read more
Source§

fn resolution<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Datetime, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Query the resolution of the clock. Read more
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn now<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Read the current value of the clock. Read more
Source§

fn resolution<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Query the resolution of the clock.
Source§

fn subscribe<'life0, 'async_trait>( &'life0 mut self, when: u64, absolute: bool, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Create a pollable which will resolve once the specified time has been reached.
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn display<'life0, 'async_trait>( &'life0 mut self, timezone: u32, when: Datetime, ) -> Pin<Box<dyn Future<Output = Result<TimezoneDisplay, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return information needed to display the given datetime. This includes the UTC offset, the time zone name, and a flag indicating whether daylight saving time is active. Read more
Source§

fn utc_offset<'life0, 'async_trait>( &'life0 mut self, timezone: u32, when: Datetime, ) -> Pin<Box<dyn Future<Output = Result<i32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

The same as display, but only return the UTC offset.
Source§

fn drop_timezone<'life0, 'async_trait>( &'life0 mut self, timezone: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Dispose of the specified input-stream, after which it may no longer be used.
Source§

impl<T> Host for T
where T: WasiView,

Source§

fn advise<'life0, 'async_trait>( &'life0 mut self, fd: u32, offset: u64, len: u64, advice: Advice, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Provide file advisory information on a descriptor. Read more
Source§

fn sync_data<'life0, 'async_trait>( &'life0 mut self, fd: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Synchronize the data of a file to disk. Read more
Source§

fn get_flags<'life0, 'async_trait>( &'life0 mut self, fd: u32, ) -> Pin<Box<dyn Future<Output = Result<DescriptorFlags, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Get flags associated with a descriptor. Read more
Source§

fn get_type<'life0, 'async_trait>( &'life0 mut self, fd: u32, ) -> Pin<Box<dyn Future<Output = Result<DescriptorType, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Get the dynamic type of a descriptor. Read more
Source§

fn set_size<'life0, 'async_trait>( &'life0 mut self, fd: u32, size: u64, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Adjust the size of an open file. If this increases the file’s size, the extra bytes are filled with zeros. Read more
Source§

fn set_times<'life0, 'async_trait>( &'life0 mut self, fd: u32, atim: NewTimestamp, mtim: NewTimestamp, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Adjust the timestamps of an open file or directory. Read more
Source§

fn read<'life0, 'async_trait>( &'life0 mut self, fd: u32, len: u64, offset: u64, ) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, bool), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Read from a descriptor, without using and updating the descriptor’s offset. Read more
Source§

fn write<'life0, 'async_trait>( &'life0 mut self, fd: u32, buf: Vec<u8>, offset: u64, ) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Write to a descriptor, without using and updating the descriptor’s offset. Read more
Source§

fn read_directory<'life0, 'async_trait>( &'life0 mut self, fd: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Read directory entries from a directory. Read more
Source§

fn read_directory_entry<'life0, 'async_trait>( &'life0 mut self, stream: u32, ) -> Pin<Box<dyn Future<Output = Result<Option<DirectoryEntry>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Read a single directory entry from a directory-entry-stream.
Source§

fn drop_directory_entry_stream<'life0, 'async_trait>( &'life0 mut self, stream: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Dispose of the specified directory-entry-stream, after which it may no longer be used.
Source§

fn sync<'life0, 'async_trait>( &'life0 mut self, fd: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Synchronize the data and metadata of a file to disk. Read more
Source§

fn create_directory_at<'life0, 'async_trait>( &'life0 mut self, fd: u32, path: String, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Create a directory. Read more
Source§

fn stat<'life0, 'async_trait>( &'life0 mut self, fd: u32, ) -> Pin<Box<dyn Future<Output = Result<DescriptorStat, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return the attributes of an open file or directory. Read more
Source§

fn stat_at<'life0, 'async_trait>( &'life0 mut self, fd: u32, path_flags: PathFlags, path: String, ) -> Pin<Box<dyn Future<Output = Result<DescriptorStat, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return the attributes of a file or directory. Read more
Source§

fn set_times_at<'life0, 'async_trait>( &'life0 mut self, fd: u32, path_flags: PathFlags, path: String, atim: NewTimestamp, mtim: NewTimestamp, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Adjust the timestamps of a file or directory. Read more
Create a hard link. Read more
Source§

fn open_at<'life0, 'async_trait>( &'life0 mut self, fd: u32, path_flags: PathFlags, path: String, oflags: OpenFlags, flags: DescriptorFlags, _mode: Modes, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Open a file or directory. Read more
Source§

fn drop_descriptor<'life0, 'async_trait>( &'life0 mut self, fd: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Dispose of the specified descriptor, after which it may no longer be used.
Read the contents of a symbolic link. Read more
Source§

fn remove_directory_at<'life0, 'async_trait>( &'life0 mut self, fd: u32, path: String, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Remove a directory. Read more
Source§

fn rename_at<'life0, 'async_trait>( &'life0 mut self, fd: u32, old_path: String, new_fd: u32, new_path: String, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Rename a filesystem object. Read more
Create a symbolic link (also known as a “symlink”). Read more
Unlink a filesystem object that is not a directory. Read more
Source§

fn access_at<'life0, 'async_trait>( &'life0 mut self, _fd: u32, _path_flags: PathFlags, _path: String, _access: AccessType, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Check accessibility of a filesystem path. Read more
Source§

fn change_file_permissions_at<'life0, 'async_trait>( &'life0 mut self, _fd: u32, _path_flags: PathFlags, _path: String, _mode: Modes, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Change the permissions of a filesystem object that is not a directory. Read more
Source§

fn change_directory_permissions_at<'life0, 'async_trait>( &'life0 mut self, _fd: u32, _path_flags: PathFlags, _path: String, _mode: Modes, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Change the permissions of a directory. Read more
Source§

fn lock_shared<'life0, 'async_trait>( &'life0 mut self, _fd: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Request a shared advisory lock for an open file. Read more
Source§

fn lock_exclusive<'life0, 'async_trait>( &'life0 mut self, _fd: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Request an exclusive advisory lock for an open file. Read more
Source§

fn try_lock_shared<'life0, 'async_trait>( &'life0 mut self, _fd: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Request a shared advisory lock for an open file. Read more
Source§

fn try_lock_exclusive<'life0, 'async_trait>( &'life0 mut self, _fd: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Request an exclusive advisory lock for an open file. Read more
Source§

fn unlock<'life0, 'async_trait>( &'life0 mut self, _fd: u32, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Release a shared or exclusive lock on an open file. Read more
Source§

fn read_via_stream<'life0, 'async_trait>( &'life0 mut self, fd: u32, offset: u64, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return a stream for reading from a file. Read more
Source§

fn write_via_stream<'life0, 'async_trait>( &'life0 mut self, fd: u32, offset: u64, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return a stream for writing to a file. Read more
Source§

fn append_via_stream<'life0, 'async_trait>( &'life0 mut self, fd: u32, ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return a stream for appending to a file. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

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

fn in_current_span(self) -> Instrumented<Self>

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

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Pointer = u32

Source§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,