pub struct OutputBuffers { /* private fields */ }Expand description
CoreVM output stream buffers (builder counterpart).
The builder uses this struct to collect output from the service.
The service counterpart.
Implementations§
Source§impl OutputBuffers
impl OutputBuffers
Sourcepub fn append_from_segments(
&mut self,
segments: &[Segment],
stream_len: &[u32; 4],
)
pub fn append_from_segments( &mut self, segments: &[Segment], stream_len: &[u32; 4], )
Append the output streams from segments.
Each stream size is specified in stream_len array.
The data starts with segments[0][..] and ends with
segments[segments.len() - 1][..total_stream_len % SEGMENT_LEN] when sum_stream_len > 0.
Here total_stream_len is the total size of all streams.
Sourcepub fn append_from_segments_one(
&mut self,
segments: &[Segment],
stream: OutputStream,
stream_start: usize,
stream_end: usize,
)
pub fn append_from_segments_one( &mut self, segments: &[Segment], stream: OutputStream, stream_start: usize, stream_end: usize, )
Append specified output stream from segments.
Sourcepub fn get(&self, i: OutputStream) -> &[u8]
pub fn get(&self, i: OutputStream) -> &[u8]
Get immutable slice of buffer i.
Sourcepub fn get_mut(&mut self, i: OutputStream) -> &mut Vec<u8>
pub fn get_mut(&mut self, i: OutputStream) -> &mut Vec<u8>
Get mutable slice of buffer i.
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