pub struct OutputChunk {
pub generation: u64,
pub attempt: u32,
pub stream: StreamKind,
pub seq: u64,
pub ts: SystemTime,
pub line: Bytes,
}Expand description
Output bytes from one task run.
§Example
use bytes::Bytes;
use solti_model::{OutputChunk, StreamKind};
use std::time::SystemTime;
let chunk = OutputChunk {
generation: 2,
attempt: 1,
stream: StreamKind::Stderr,
seq: 7,
ts: SystemTime::UNIX_EPOCH,
line: Bytes::from_static(b"warning"),
};
assert_eq!(chunk.seq, 7);Fields§
§generation: u64Desired-state generation this chunk belongs to.
attempt: u32Attempt that produced this chunk.
stream: StreamKindStandard stream that produced the chunk.
seq: u64Sequence number within this generation, attempt, and stream.
Producers define allocation and reset behavior.
ts: SystemTimeWall-clock event time.
Serde encodes it as Unix milliseconds.
line: BytesRaw output bytes.
Serde encodes them as standard padded base64.
Trait Implementations§
Source§impl Clone for OutputChunk
impl Clone for OutputChunk
Source§fn clone(&self) -> OutputChunk
fn clone(&self) -> OutputChunk
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutputChunk
impl Debug for OutputChunk
Source§impl<'de> Deserialize<'de> for OutputChunk
impl<'de> Deserialize<'de> for OutputChunk
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for OutputChunk
Source§impl JsonSchema for OutputChunk
impl JsonSchema for OutputChunk
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for OutputChunk
impl PartialEq for OutputChunk
Source§impl Serialize for OutputChunk
impl Serialize for OutputChunk
impl StructuralPartialEq for OutputChunk
Auto Trait Implementations§
impl !Freeze for OutputChunk
impl RefUnwindSafe for OutputChunk
impl Send for OutputChunk
impl Sync for OutputChunk
impl Unpin for OutputChunk
impl UnsafeUnpin for OutputChunk
impl UnwindSafe for OutputChunk
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