Module workflow_rs::core::utils
source · Expand description
buffer slicing and other utilities
Functions
- Takes a
&[u8]
buffer slice and returns a slice&[T]
with a given number of elements of typeT
- Takes a mutable
&[u8]
buffer slice and returns a mutable slice&[T]
with a given number of elements of typeT
- Takes a reference to a struct of type
T
and returns a raw&[u8]
slice with byte length of the typeT
- Truncate a string, optionally appending another string or appending
"..."
if theappend
string isNone
- Extract a substring starting at 0 and truncating it to
min(length,str.len())
.