[][src]Module fil_ocl_core::util

Utility and debugging functions.

Stability

Printing functions may be moved/renamed/removed at any time.

Modules

colors

ASCII Color Palette

Enums

UtilError

An error caused by a utility function.

VecRemoveRebuildError

An error caused by util::vec_remove_rebuild.

Functions

bytes_into

Converts a vector of bytes into a value of arbitrary type.

bytes_into_string

Converts a byte Vec into a string, removing the trailing null byte if it exists.

bytes_into_vec

Converts a vector of bytes into a vector of arbitrary type.

bytes_to

Copies a slice of bytes to a new value of arbitrary type.

bytes_to_u32

Copies a byte slice to a new u32.

bytes_to_vec

Copies a slice of bytes into a vector of arbitrary type.

into_bytes

[UNTESTED] Copies an arbitrary primitive or struct into core bytes.

padded_len

Pads len to make it evenly divisible by incr.

print_bytes_as_hex

Prints bytes as hex.

print_simple
print_slice

[UNSTABLE]: MAY BE REMOVED AT ANY TIME Prints a vector to stdout. Used for debugging.

print_val_range
vec_remove_rebuild

Batch removes elements from a vector using a list of indices to remove.

wrap_vals

Wraps (%) each value in the list vals if it equals or exceeds val_n.