pub enum VMResponse {
Empty,
Value(Value),
Path(PathBuf),
Directory(Vec<(Bytes, FileType)>),
Span(Span),
Reader(Box<dyn Read>),
FileType(FileType),
Env(OsString),
}Expand description
Responses returned to generators from the VM.
Variants§
Empty
Empty message. Passed to the generator as the first message, or when return values were optional.
Value(Value)
Value produced by the VM and returned to the generator.
Path(PathBuf)
Path produced by the VM in response to some IO operation.
Directory(Vec<(Bytes, FileType)>)
VM response with the contents of a directory.
Span(Span)
VM response with a span to use at the current point.
Reader(Box<dyn Read>)
Reader produced by the VM in response to some IO operation.
FileType(FileType)
Env(OsString)
environment variable
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VMResponse
impl !RefUnwindSafe for VMResponse
impl !Send for VMResponse
impl !Sync for VMResponse
impl Unpin for VMResponse
impl !UnwindSafe for VMResponse
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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