pub struct RemoteBuildEvent {
pub protocol_version: ProtocolVersion,
pub operation_id: String,
pub job_id: String,
pub timestamp_ms: u64,
pub provider: String,
pub phase: String,
pub sequence: u64,
pub kind: RemoteBuildEventKind,
}Expand description
One self-contained NDJSON event envelope.
Fields§
§protocol_version: ProtocolVersionWire-protocol version.
operation_id: StringCaller-owned operation identifier.
job_id: StringProvider-owned job identifier.
timestamp_ms: u64Milliseconds since Unix epoch in UTC.
provider: StringStable provider identifier.
phase: StringStable build-phase identifier.
sequence: u64Strictly increasing event sequence within one job.
kind: RemoteBuildEventKindTyped event-specific fields.
Implementations§
Source§impl RemoteBuildEvent
impl RemoteBuildEvent
Sourcepub fn new(
operation_id: impl Into<String>,
job_id: impl Into<String>,
timestamp_ms: u64,
provider: impl Into<String>,
phase: impl Into<String>,
sequence: u64,
kind: RemoteBuildEventKind,
) -> RemoteBuildResult<Self>
pub fn new( operation_id: impl Into<String>, job_id: impl Into<String>, timestamp_ms: u64, provider: impl Into<String>, phase: impl Into<String>, sequence: u64, kind: RemoteBuildEventKind, ) -> RemoteBuildResult<Self>
Construct and validate an event envelope.
§Errors
Returns a typed validation error when envelope or payload invariants fail.
Sourcepub fn encode_line(&self) -> RemoteBuildResult<String>
pub fn encode_line(&self) -> RemoteBuildResult<String>
Encode one compact JSON object followed by a newline.
§Errors
Returns a typed validation or serialization error.
Sourcepub fn decode_line(encoded: &str) -> RemoteBuildResult<Self>
pub fn decode_line(encoded: &str) -> RemoteBuildResult<Self>
Decode exactly one UTF-8 JSON object, tolerating trailing whitespace.
§Errors
Returns a typed size, syntax, truncation, version, or validation error.
Sourcepub fn decode_line_bytes(encoded: &[u8]) -> RemoteBuildResult<Self>
pub fn decode_line_bytes(encoded: &[u8]) -> RemoteBuildResult<Self>
Decode one event from untrusted bytes and reject non-UTF-8 input.
§Errors
Returns RemoteBuildError::InvalidUtf8 or any error from Self::decode_line.
Sourcepub fn validate(&self) -> RemoteBuildResult<()>
pub fn validate(&self) -> RemoteBuildResult<()>
Validate envelope, progress, path, and terminal-event invariants.
§Errors
Returns a typed version, identifier, path, payload, or serialization error.
Trait Implementations§
Source§impl Clone for RemoteBuildEvent
impl Clone for RemoteBuildEvent
Source§impl Debug for RemoteBuildEvent
impl Debug for RemoteBuildEvent
Source§impl<'de> Deserialize<'de> for RemoteBuildEvent
impl<'de> Deserialize<'de> for RemoteBuildEvent
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>,
Source§impl JsonSchema for RemoteBuildEvent
impl JsonSchema for RemoteBuildEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more