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 type T
  • Takes a mutable &[u8] buffer slice and returns a mutable slice &[T] with a given number of elements of type T
  • Takes a reference to a struct of type T and returns a raw &[u8] slice with byte length of the type T
  • Truncate a string, optionally appending another string or appending "..." if the append string is None
  • Extract a substring starting at 0 and truncating it to min(length,str.len()).