pub struct Stream<T> { /* private fields */ }Expand description
A list of T kept written: its body in the binary form, its strings its own.
Implementations§
Source§impl<T: Schema> Stream<T>
impl<T: Schema> Stream<T>
Trait Implementations§
Source§impl<T: Schema> FromIterator<T> for Stream<T>
impl<T: Schema> FromIterator<T> for Stream<T>
Source§fn from_iter<I: IntoIterator<Item = T>>(items: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(items: I) -> Self
Creates a value from an iterator. Read more
Source§impl<T: Schema> Schema for Stream<T>
impl<T: Schema> Schema for Stream<T>
Source§fn read(v: &ValueRef<'_>, cx: &mut Reader<'_>) -> Option<Self>
fn read(v: &ValueRef<'_>, cx: &mut Reader<'_>) -> Option<Self>
The slow way (a text file, a value): read whole, then written.
Source§fn encode(&self, w: &mut Writer)
fn encode(&self, w: &mut Writer)
Writes itself in the binary form, straight —
Schema::write’s
value encoded, unless the type knows better (derived ones do).Source§fn decode(d: &mut Decoder<'_>) -> Option<Self>
fn decode(d: &mut Decoder<'_>) -> Option<Self>
Reads itself from the binary form, straight;
None when it isn’t
what Schema::encode writes — then read_bytes reads the slow
way, which says what’s wrong. Through a value unless the type knows
better (derived ones do).Source§fn unpack(u: &mut Unpacker<'_>) -> Option<Self>
fn unpack(u: &mut Unpacker<'_>) -> Option<Self>
Reads itself out of a frame;
None if the bytes aren’t what
Schema::pack writes.Source§fn absent() -> Option<Self>
fn absent() -> Option<Self>
The value of a field that isn’t there —
None: the field is required.Source§fn pack_list(items: &[Self], p: &mut Packer)
fn pack_list(items: &[Self], p: &mut Packer)
A list of these packed: a count, then each one (floats raw).
Source§fn encode_list(items: &[Self], w: &mut Writer)
fn encode_list(items: &[Self], w: &mut Writer)
A list of these written straight (numbers pack theirs).
Auto Trait Implementations§
impl<T> Freeze for Stream<T>
impl<T> RefUnwindSafe for Stream<T>
impl<T> Send for Stream<T>
impl<T> Sync for Stream<T>
impl<T> Unpin for Stream<T>
impl<T> UnsafeUnpin for Stream<T>
impl<T> UnwindSafe for Stream<T>
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