pub struct Layout {
pub fields: Vec<Field>,
pub byte_order: ByteOrder,
pub block: Option<String>,
}Expand description
A record layout as its file states it: the fields of a record, their byte order, and for a serial console’s capture, the block the records are in.
Fields§
§fields: Vec<Field>Each field of a record, in the record’s order. A field’s name states its unit as a
table’s header does, such as Time (ms) or pressure__pa: the records are written out
as a table under those names and read by what they state (records::read), so one
field must be a clock in a unit of time.
byte_order: ByteOrderThe order of each field’s bytes: little-endian unless the layout says otherwise.
block: Option<String>For a serial console’s capture of the records as base64, the name of the block they are
in, as the capture’s start marker names it (capture); None for a file of the
records’ bytes.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn record_layout(&self) -> RecordLayout
pub fn record_layout(&self) -> RecordLayout
The fields and byte order, as records::read and capture::read take them.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Layout
impl<'de> Deserialize<'de> for Layout
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>,
impl Eq for Layout
Source§impl JsonSchema for Layout
impl JsonSchema for Layout
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 moreimpl StructuralPartialEq for Layout
Auto Trait Implementations§
impl Freeze for Layout
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnsafeUnpin for Layout
impl UnwindSafe for Layout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.