#[non_exhaustive]pub enum Action<'a> {
Read {
offset: u64,
buf: &'a mut [u8],
},
Write(&'a [u8]),
Done,
}Expand description
What the caller of Execution::step must do before calling it again.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Read
Fill buf completely with the source asset’s bytes from offset.
A source that has fewer bytes than that is not the stream the plan was made from; report it as an error and stop.
Fields
Write(&'a [u8])
Write these bytes to the output, which is written from its start, in order.
Done
The plan has been carried out in full.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !UnwindSafe for Action<'a>
impl<'a> Forget for Action<'a>
impl<'a> Freeze for Action<'a>
impl<'a> Move for Action<'a>
impl<'a> RefUnwindSafe for Action<'a>
impl<'a> Send for Action<'a>
impl<'a> Sync for Action<'a>
impl<'a> Unpin for Action<'a>
impl<'a> UnsafeUnpin for Action<'a>
Blanket Implementations§
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