Struct fourleaf::stream::Field
[−]
[src]
pub struct Field<'d, R: 'd> { pub tag: u8, pub pos: u64, pub depth: u64, pub value: Value<'d, R>, }
A field decoded from a fourleaf stream.
Fields
tag: u8
The tag of this field, in the range 1..63, inclusive.
pos: u64
The offset of this field in the stream. This specifically points to the byte containing the tag.
depth: u64
The struct nesting depth of this field in the stream. Always at least
1. See also Stream::struct_depth()
.
Note that even for Struct
s and Enum
s, this is the depth of the
field itself, and not its contents, whereas immediately after reading
such a field the value of Stream::struct_depth()
will reflect the
depth of the contents.
value: Value<'d, R>
The value of this field.
Methods
impl<'d, R: 'd> Field<'d, R>
[src]
fn skip(self) -> Result<()> where
R: Read,
R: Read,
Causes this field and all its children to be skipped.
The actual IO of skipping this field does not necessarily happen within
this call, and may be deferred to the next call to next_field
or
anything else that results in committing the Stream
.