Enum cobs::PushResult
source · pub enum PushResult {
AddSingle(u8),
ModifyFromStartAndSkip((usize, u8)),
ModifyFromStartAndPushAndSkip((usize, u8, u8)),
}
Expand description
PushResult
is used to represent the changes to an (encoded)
output data buffer when an unencoded byte is pushed into EncoderState
.
Variants§
AddSingle(u8)
The returned byte should be placed at the current end of the data buffer
ModifyFromStartAndSkip((usize, u8))
The byte at the given index should be replaced with the given byte. Additionally, a placeholder byte should be inserted at the current end of the output buffer to be later modified
ModifyFromStartAndPushAndSkip((usize, u8, u8))
The byte at the given index should be replaced with the given byte. Then, the last u8 in this tuple should be inserted at the end of the current output buffer. Finally, a placeholder byte should be inserted at the current end of the output buffer to be later modified
Auto Trait Implementations§
impl Freeze for PushResult
impl RefUnwindSafe for PushResult
impl Send for PushResult
impl Sync for PushResult
impl Unpin for PushResult
impl UnwindSafe for PushResult
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