@@ -287,43 +287,47 @@ pub struct Instance {
287287/// Request a specific range of an Instance's serial console output history.
288288#[ derive( Clone , Debug , Deserialize , Serialize , JsonSchema , PartialEq ) ]
289289pub struct InstanceSerialConsoleHistoryRequest {
290- /// Character index in the serial buffer from which to read, counting the bytes output since
291- /// instance start. If this is not provided, `most_recent` must be provided, and if this *is*
292- /// provided, `most_recent` must *not* be provided.
290+ /// Character index in the serial buffer from which to read, counting the
291+ /// bytes output since instance start. If this is not provided,
292+ /// `most_recent` must be provided, and if this *is* provided, `most_recent`
293+ /// must *not* be provided.
293294 pub from_start : Option < u64 > ,
294- /// Character index in the serial buffer from which to read, counting *backward* from the most
295- /// recently buffered data retrieved from the instance. (See note on `from_start` about mutual
296- /// exclusivity)
295+ /// Character index in the serial buffer from which to read, counting
296+ /// *backward* from the most recently buffered data retrieved from the
297+ /// instance. (See note on `from_start` about mutual exclusivity)
297298 pub most_recent : Option < u64 > ,
298- /// Maximum number of bytes of buffered serial console contents to return. If the requested
299- /// range runs to the end of the available buffer, the data returned will be shorter than
300- /// `max_bytes`.
299+ /// Maximum number of bytes of buffered serial console contents to return.
300+ /// If the requested range runs to the end of the available buffer, the data
301+ /// returned will be shorter than `max_bytes`.
301302 pub max_bytes : Option < u64 > ,
302303}
303304
304305/// Contents of an Instance's serial console buffer.
305306#[ derive( Clone , Debug , Deserialize , Serialize , JsonSchema ) ]
306307pub struct InstanceSerialConsoleHistoryResponse {
307- /// The bytes starting from the requested offset up to either the end of the buffer or the
308- /// request's `max_bytes`. Provided as a u8 array rather than a string, as it may not be UTF-8.
308+ /// The bytes starting from the requested offset up to either the end of the
309+ /// buffer or the request's `max_bytes`. Provided as a u8 array rather than
310+ /// a string, as it may not be UTF-8.
309311 pub data : Vec < u8 > ,
310- /// The absolute offset since boot (suitable for use as `byte_offset` in a subsequent request)
311- /// of the last byte returned in `data`.
312+ /// The absolute offset since boot (suitable for use as `byte_offset` in a
313+ /// subsequent request) of the last byte returned in `data`.
312314 pub last_byte_offset : u64 ,
313315}
314316
315317/// Connect to an Instance's serial console via websocket, optionally sending
316318/// bytes from the buffered history first.
317319#[ derive( Clone , Debug , Deserialize , Serialize , JsonSchema , PartialEq ) ]
318320pub struct InstanceSerialConsoleStreamRequest {
319- /// Character index in the serial buffer from which to read, counting the bytes output since
320- /// instance start. If this is provided, `most_recent` must *not* be provided.
321- // TODO: if neither is specified, send enough serial buffer history to reconstruct
322- // the current contents and cursor state of an interactive terminal
321+ /// Character index in the serial buffer from which to read, counting the
322+ /// bytes output since instance start. If this is provided, `most_recent`
323+ /// must *not* be provided.
324+ // TODO: if neither is specified, send enough serial buffer history to
325+ // reconstruct the current contents and cursor state of an interactive
326+ // terminal
323327 pub from_start : Option < u64 > ,
324- /// Character index in the serial buffer from which to read, counting *backward* from the most
325- /// recently buffered data retrieved from the instance. (See note on `from_start` about mutual
326- /// exclusivity)
328+ /// Character index in the serial buffer from which to read, counting
329+ /// *backward* from the most recently buffered data retrieved from the
330+ /// instance. (See note on `from_start` about mutual exclusivity)
327331 pub most_recent : Option < u64 > ,
328332 /// True if the connection should allow writing. If this option is set, any
329333 /// existing writer to the serial console will be disconnected when this
0 commit comments