Skip to main content

Module string

Module string 

Source

Traits§

ListDebug
Extension trait to convert a list of debug-printable items into a single string. For example, vec![Some(1), None, Some(3)].list_debug(", ") will produce the string Some(1), None, Some(3)
ListToString
Extension trait to convert a list of displayable items into a single string. For example, vec![1, 2, 3].list_to_string(", ") will produce the string 1, 2, 3.
ListsDebug
Extension trait to convert a list of lists of debuggable items into a single string. For example, vec![vec![Some(1), Some(2)], vec![Some(3)]].lists_debug(", ", " | ") will produce the string "[Some(1), Some(2)] | [Some(3)]".
ListsToString
Extension trait to convert a list of lists of displayable items into a single string. For example, vec![vec![1, 2], vec![3]].lists_to_string(", ", " | ") will produce the string "[1, 2] | [3]".

Functions§

blanket_try_from_hex_bytes
An implementation of ‘TryFrom’ from hex-encoded strings, for any type that can be decoded from CBOR. Yields the original bytes and the deserialized value.
display_collection
encode_bech32