pub struct WindowedInfinity<'a> { /* fields omitted */ }A WindowedInfinity represents an infinite writable space. A small section of it is mapped to a
&mut u8 to which writes are forwarded; writes to the area outside are silently discsarded.
pub fn new(view: &'a mut [u8], cursor: isize) -> Self | [src] |
Create a new infinity with the window passed as view. The cursor parameter indicates where
(in the index space of the view) the infinity's write operations should start, and is
typically either 0 or negative.
Report the current write cursor position in the index space of the view.
This typically used at the end of an infinity's life time to see whether the view needs to
be truncated before further processing, and whether there was any data discarded after the
view.
At the current cursor position, insert the given data.
The operation is always successful, and at least changes the write cursor.
Obtain the written content inside the window, if any.
The slices could be made to have a longer lifetime if there is demand for that by using the
sealingslice crate.
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
🔬 This is a nightly-only experimental API. (try_from)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static