pub struct OutputBuffers { /* private fields */ }Expand description
CoreVM output stream buffers.
Use this struct to collect output from the service.
Implementations§
Source§impl OutputBuffers
impl OutputBuffers
Sourcepub fn from_segments(
segments: &[Segment],
stream_len: &[u32; 4],
) -> Result<Self, Error>
pub fn from_segments( segments: &[Segment], stream_len: &[u32; 4], ) -> Result<Self, Error>
Create output buffers from the output streams stored in segments.
Each stream size is specified in stream_len array.
The data should start at the beginning of the first segment and end somewhere in the last
segment. The total length equals the sum of lengths in stream_len array.
Sourcepub fn from_segments_one(
segments: &[Segment],
stream: OutputStream,
stream_start: usize,
stream_end: usize,
) -> Result<Self, Error>
pub fn from_segments_one( segments: &[Segment], stream: OutputStream, stream_start: usize, stream_end: usize, ) -> Result<Self, Error>
Create output buffers from the specified output stream stored in segments.
Sourcepub fn get_console_buf(&self, i: OutputStream) -> &[ConsoleChunk]
pub fn get_console_buf(&self, i: OutputStream) -> &[ConsoleChunk]
Get decoded stdout/stderr buffer.
Sourcepub fn take_console_buf(&mut self, i: OutputStream) -> Vec<ConsoleChunk>
pub fn take_console_buf(&mut self, i: OutputStream) -> Vec<ConsoleChunk>
Take decoded stdout/stderr buffer.
Sourcepub fn get_encoded_buf(&self, i: OutputStream) -> &[u8]
pub fn get_encoded_buf(&self, i: OutputStream) -> &[u8]
Get encoded video/audio buffer.
Sourcepub fn take_encoded_buf(&mut self, i: OutputStream) -> Vec<u8>
pub fn take_encoded_buf(&mut self, i: OutputStream) -> Vec<u8>
Take encoded video/audio buffer.
Trait Implementations§
Source§impl Default for OutputBuffers
impl Default for OutputBuffers
Source§fn default() -> OutputBuffers
fn default() -> OutputBuffers
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for OutputBuffers
impl RefUnwindSafe for OutputBuffers
impl Send for OutputBuffers
impl Sync for OutputBuffers
impl Unpin for OutputBuffers
impl UnwindSafe for OutputBuffers
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