pub struct WriteCursor<'b> { /* private fields */ }
Expand description

A cursor over a byte slice for easy serializing of UAVCAN data types

Functions that write values will panic if no space is available in the slice.

Implementations

Creates a cursor that will write starting at the beginning of the provided slice

Returns true if this cursor is aligned to a multiple of 8 bits

Writes an 8-bit integer

Panics

This function panics if the cursor is not aligned to a multiple of 8 bits.

Writes a 16-bit integer

Panics

This function panics if the cursor is not aligned to a multiple of 8 bits.

Writes a 32-bit integer

Panics

This function panics if the cursor is not aligned to a multiple of 8 bits.

Writes a 64-bit integer

Panics

This function panics if the cursor is not aligned to a multiple of 8 bits.

Advances the cursor to a byte boundary (a multiple of 8 bits)

Writes a 16-bit floating-point value

Writes a 32-bit floating-point value

Writes a 64-bit floating-point value

Writes a byte array

Writes a sequence of bytes

Panics

This function panics if the cursor is not aligned to a multiple of 8 bits.

Writes a composite value, aligned to 8 bits

Writes a boolean value (1 bit)

Returns the number of bits that have been written to this cursor

Writes a 1-bit unsigned integer

Writes a 2-bit unsigned integer

Writes a 3-bit unsigned integer

Writes a 4-bit unsigned integer

Writes a 5-bit unsigned integer

Writes a 6-bit unsigned integer

Writes a 7-bit unsigned integer

Writes a 8-bit unsigned integer

Writes a 9-bit unsigned integer

Writes a 10-bit unsigned integer

Writes a 11-bit unsigned integer

Writes a 12-bit unsigned integer

Writes a 13-bit unsigned integer

Writes a 14-bit unsigned integer

Writes a 15-bit unsigned integer

Writes a 16-bit unsigned integer

Writes a 17-bit unsigned integer

Writes a 18-bit unsigned integer

Writes a 19-bit unsigned integer

Writes a 20-bit unsigned integer

Writes a 21-bit unsigned integer

Writes a 22-bit unsigned integer

Writes a 23-bit unsigned integer

Writes a 24-bit unsigned integer

Writes a 25-bit unsigned integer

Writes a 26-bit unsigned integer

Writes a 27-bit unsigned integer

Writes a 28-bit unsigned integer

Writes a 29-bit unsigned integer

Writes a 30-bit unsigned integer

Writes a 31-bit unsigned integer

Writes a 32-bit unsigned integer

Writes a 33-bit unsigned integer

Writes a 34-bit unsigned integer

Writes a 35-bit unsigned integer

Writes a 36-bit unsigned integer

Writes a 37-bit unsigned integer

Writes a 38-bit unsigned integer

Writes a 39-bit unsigned integer

Writes a 40-bit unsigned integer

Writes a 41-bit unsigned integer

Writes a 42-bit unsigned integer

Writes a 43-bit unsigned integer

Writes a 44-bit unsigned integer

Writes a 45-bit unsigned integer

Writes a 46-bit unsigned integer

Writes a 47-bit unsigned integer

Writes a 48-bit unsigned integer

Writes a 49-bit unsigned integer

Writes a 50-bit unsigned integer

Writes a 51-bit unsigned integer

Writes a 52-bit unsigned integer

Writes a 53-bit unsigned integer

Writes a 54-bit unsigned integer

Writes a 55-bit unsigned integer

Writes a 56-bit unsigned integer

Writes a 57-bit unsigned integer

Writes a 58-bit unsigned integer

Writes a 59-bit unsigned integer

Writes a 60-bit unsigned integer

Writes a 61-bit unsigned integer

Writes a 62-bit unsigned integer

Writes a 63-bit unsigned integer

Writes a 64-bit unsigned integer

Advances the cursor to skip 1 bit

Advances the cursor to skip 2 bits

Advances the cursor to skip 3 bits

Advances the cursor to skip 4 bits

Advances the cursor to skip 5 bits

Advances the cursor to skip 6 bits

Advances the cursor to skip 7 bits

Advances the cursor to skip 8 bits

Advances the cursor to skip 9 bits

Advances the cursor to skip 10 bits

Advances the cursor to skip 11 bits

Advances the cursor to skip 12 bits

Advances the cursor to skip 13 bits

Advances the cursor to skip 14 bits

Advances the cursor to skip 15 bits

Advances the cursor to skip 16 bits

Advances the cursor to skip 17 bits

Advances the cursor to skip 18 bits

Advances the cursor to skip 19 bits

Advances the cursor to skip 20 bits

Advances the cursor to skip 21 bits

Advances the cursor to skip 22 bits

Advances the cursor to skip 23 bits

Advances the cursor to skip 24 bits

Advances the cursor to skip 25 bits

Advances the cursor to skip 26 bits

Advances the cursor to skip 27 bits

Advances the cursor to skip 28 bits

Advances the cursor to skip 29 bits

Advances the cursor to skip 30 bits

Advances the cursor to skip 31 bits

Advances the cursor to skip 32 bits

Advances the cursor to skip 33 bits

Advances the cursor to skip 34 bits

Advances the cursor to skip 35 bits

Advances the cursor to skip 36 bits

Advances the cursor to skip 37 bits

Advances the cursor to skip 38 bits

Advances the cursor to skip 39 bits

Advances the cursor to skip 40 bits

Advances the cursor to skip 41 bits

Advances the cursor to skip 42 bits

Advances the cursor to skip 43 bits

Advances the cursor to skip 44 bits

Advances the cursor to skip 45 bits

Advances the cursor to skip 46 bits

Advances the cursor to skip 47 bits

Advances the cursor to skip 48 bits

Advances the cursor to skip 49 bits

Advances the cursor to skip 50 bits

Advances the cursor to skip 51 bits

Advances the cursor to skip 52 bits

Advances the cursor to skip 53 bits

Advances the cursor to skip 54 bits

Advances the cursor to skip 55 bits

Advances the cursor to skip 56 bits

Advances the cursor to skip 57 bits

Advances the cursor to skip 58 bits

Advances the cursor to skip 59 bits

Advances the cursor to skip 60 bits

Advances the cursor to skip 61 bits

Advances the cursor to skip 62 bits

Advances the cursor to skip 63 bits

Advances the cursor to skip 64 bits

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.