Expand description
Lean’s unboxed arrays: ByteArray and FloatArray.
Each is a Vec of the element type inside a Lean object, so a Vec<u8> or Vec<f64>
moves in and out without conversion. As in lean.h: an array a function changes is
consumed, arrays and indexes that are only read are borrowed, results are owned.
Functions§
- byte_
array_ ⚠compare - An
Ordering: 0 for less, 1 for equal, 2 for greater. - byte_
array_ ⚠copy_ slice targetwithlenbytes ofsourcefromsource_offsetwritten over it attarget_offset. The result ends where the copied bytes end if they reach past the end oftarget. Consumestarget.- byte_
array_ ⚠data - The bytes as an
Array UInt8. Consumesa. - byte_
array_ ⚠dec_ lt - byte_
array_ ⚠fget - byte_
array_ from_ vec - A
ByteArraythat takes over the buffer ofbytes. - byte_
array_ ⚠fset - byte_
array_ ⚠get - Lean’s
bytes[i]!: an index outside the array is a panic. - byte_
array_ ⚠hash - byte_
array_ ⚠into_ vec - The bytes of a
ByteArray, giving up one reference to it. - byte_
array_ ⚠mk - A
ByteArrayfrom anArray UInt8, which it consumes. - byte_
array_ ⚠push - byte_
array_ ⚠set - Lean’s
bytes.set! i b: an index outside the array is a panic. - byte_
array_ ⚠size - byte_
array_ ⚠uget - byte_
array_ ⚠uset - bytes⚠
- The bytes of a
ByteArray. - float_
array_ ⚠data - The values as an
Array Float. Consumesa. - float_
array_ ⚠fget - float_
array_ from_ vec - A
FloatArraythat takes over the buffer ofvalues. - float_
array_ ⚠fset - float_
array_ ⚠get - Lean’s
values[i]!: an index outside the array is a panic. - float_
array_ ⚠into_ vec - The values of a
FloatArray, giving up one reference to it. - float_
array_ ⚠mk - A
FloatArrayfrom anArray Float, which it consumes. - float_
array_ ⚠push - float_
array_ ⚠set - float_
array_ ⚠size - float_
array_ ⚠uget - float_
array_ ⚠uset - held_
bytes ⚠ - The
VecaByteArrayholds, for lending it as it is. - held_
floats ⚠ - The
VecaFloatArrayholds, for lending it as it is. - mk_
empty_ ⚠byte_ array - mk_
empty_ ⚠float_ array - sarray_
dec_ ⚠eq - Whether two arrays of the same kind hold the same bits.
- sarray_
mark_ ⚠linear - See
array::array_mark_linear: the mark has no effect on values. - sarray_
propagate_ ⚠mark - sarray_
size ⚠