Return to Roc packages
Documentation
Str
▶
Utf8ByteProblem
Utf8Problem
is_empty
concat
with_capacity
reserve
join_with
split_on
repeat
to_utf8
from_utf8
starts_with
ends_with
trim
trim_start
trim_end
to_dec
to_f64
to_f32
to_u128
to_i128
to_u64
to_i64
to_u32
to_i32
to_u16
to_i16
to_u8
to_i8
count_utf8_bytes
replace_each
replace_first
replace_last
split_first
split_last
walk_utf8_with_index
walk_utf8
release_excess_capacity
with_prefix
contains
drop_prefix
drop_suffix
Num
▶
Num
Int
Frac
Signed128
Signed64
Signed32
Signed16
Signed8
Unsigned128
Unsigned64
Unsigned32
Unsigned16
Unsigned8
Integer
I128
I64
I32
I16
I8
U128
U64
U32
U16
U8
Decimal
Binary64
Binary32
FloatingPoint
F64
F32
Dec
e
pi
tau
to_str
int_cast
compare
is_lt
is_gt
is_lte
is_gte
is_approx_eq
is_zero
is_even
is_odd
is_positive
is_negative
to_frac
is_nan
is_infinite
is_finite
abs
abs_diff
neg
add
sub
mul
min
max
sin
cos
tan
asin
acos
atan
sqrt
sqrt_checked
log
log_checked
div
div_checked
div_ceil
div_ceil_checked
div_trunc
div_trunc_checked
rem
rem_checked
is_multiple_of
bitwise_and
bitwise_xor
bitwise_or
bitwise_not
shift_left_by
shift_right_by
shift_right_zf_by
round
floor
ceiling
pow
pow_int
count_leading_zero_bits
count_trailing_zero_bits
count_one_bits
add_wrap
add_saturated
add_checked
sub_wrap
sub_saturated
sub_checked
mul_wrap
mul_saturated
mul_checked
min_i8
max_i8
min_u8
max_u8
min_i16
max_i16
min_u16
max_u16
min_i32
max_i32
min_u32
max_u32
min_i64
max_i64
min_u64
max_u64
min_i128
max_i128
min_u128
max_u128
min_f32
max_f32
min_f64
max_f64
to_i8
to_i16
to_i32
to_i64
to_i128
to_u8
to_u16
to_u32
to_u64
to_u128
to_f32
to_f64
to_i8_checked
to_i16_checked
to_i32_checked
to_i64_checked
to_i128_checked
to_u8_checked
to_u16_checked
to_u32_checked
to_u64_checked
to_u128_checked
to_f32_checked
to_f64_checked
without_decimal_point
with_decimal_point
f32_to_parts
f64_to_parts
f32_from_parts
f64_from_parts
from_bool
nan_f32
nan_f64
infinity_f32
infinity_f64
Bool
▶
Eq
Bool
true
false
and
or
not
is_not_eq
Result
▶
Result
is_ok
is_err
with_default
map_ok
map_err
map_both
map2
try
on_err
on_err!
List
▶
is_empty
get
replace
set
update
append
append_if_ok
prepend
prepend_if_ok
len
with_capacity
reserve
release_excess_capacity
concat
last
single
repeat
reverse
join
contains
walk
walk_with_index
walk_with_index_until
walk_backwards
walk_until
walk_backwards_until
walk_from
walk_from_until
sum
product
any
all
keep_if
drop_if
count_if
keep_oks
keep_errs
map
map2
map3
map4
map_with_index
range
sort_with
sort_asc
sort_desc
swap
first
take_first
take_last
drop_first
drop_last
drop_at
min
max
join_map
find_first
find_last
find_first_index
find_last_index
sublist
intersperse
starts_with
ends_with
split_at
split_on
split_on_list
split_first
split_last
chunks_of
map_try
walk_try
concat_utf8
for_each!
for_each_try!
walk!
walk_try!
Dict
▶
Dict
empty
with_capacity
reserve
release_excess_capacity
capacity
single
from_list
len
is_empty
clear
map
join_map
walk
walk_until
keep_if
drop_if
get
contains
insert
remove
update
to_list
keys
values
insert_all
keep_shared
remove_all
Set
▶
Set
empty
with_capacity
reserve
release_excess_capacity
single
insert
len
capacity
is_empty
remove
contains
to_list
from_list
union
intersection
difference
walk
map
join_map
walk_until
keep_if
drop_if
Decode
▶
DecodeError
DecodeResult
Decoder
Decoding
DecoderFormatting
custom
decode_with
from_bytes_partial
from_bytes
map_result
Encode
▶
Encoder
Encoding
EncoderFormatting
custom
append_with
append
to_bytes
Hash
▶
Hash
Hasher
hash_str_bytes
hash_list
hash_bool
hash_i8
hash_i16
hash_i32
hash_i64
hash_i128
hash_dec
hash_unordered
Box
▶
box
unbox
Inspect
▶
KeyValWalker
ElemWalker
InspectFormatter
Inspector
custom
apply
Inspect
inspect
to_str
Tip:
Some names
differ from other languages.
(press
s
)
Str
.
Utf8ByteProblem
: [ InvalidStartByte, UnexpectedEndOfSequence, ExpectedContinuation, OverlongEncoding, CodepointTooLarge, EncodesSurrogateHalf ]
Str
.
Utf8Problem
Str
.
is_empty
: Str -> Bool
Str
.
concat
: Str, Str -> Str
Str
.
with_capacity
: U64 -> Str
Str
.
reserve
: Str, U64 -> Str
Str
.
join_with
: List Str, Str -> Str
Str
.
split_on
: Str, Str -> List Str
Str
.
repeat
: Str, U64 -> Str
Str
.
to_utf8
: Str -> List U8
Str
.
from_utf8
: List U8 -> Result Str [ BadUtf8 { problem : Utf8ByteProblem, index : U64 } ]
Str
.
starts_with
: Str, Str -> Bool
Str
.
ends_with
: Str, Str -> Bool
Str
.
trim
: Str -> Str
Str
.
trim_start
: Str -> Str
Str
.
trim_end
: Str -> Str
Str
.
to_dec
: Str -> Result Dec [InvalidNumStr]
Str
.
to_f64
: Str -> Result F64 [InvalidNumStr]
Str
.
to_f32
: Str -> Result F32 [InvalidNumStr]
Str
.
to_u128
: Str -> Result U128 [InvalidNumStr]
Str
.
to_i128
: Str -> Result I128 [InvalidNumStr]
Str
.
to_u64
: Str -> Result U64 [InvalidNumStr]
Str
.
to_i64
: Str -> Result I64 [InvalidNumStr]
Str
.
to_u32
: Str -> Result U32 [InvalidNumStr]
Str
.
to_i32
: Str -> Result I32 [InvalidNumStr]
Str
.
to_u16
: Str -> Result U16 [InvalidNumStr]
Str
.
to_i16
: Str -> Result I16 [InvalidNumStr]
Str
.
to_u8
: Str -> Result U8 [InvalidNumStr]
Str
.
to_i8
: Str -> Result I8 [InvalidNumStr]
Str
.
count_utf8_bytes
: Str -> U64
Str
.
replace_each
: Str, Str, Str -> Str
Str
.
replace_first
: Str, Str, Str -> Str
Str
.
replace_last
: Str, Str, Str -> Str
Str
.
split_first
: Str, Str -> Result { before : Str, after : Str } [NotFound]
Str
.
split_last
: Str, Str -> Result { before : Str, after : Str } [NotFound]
Str
.
walk_utf8_with_index
: Str, state, (state, U8, U64 -> state) -> state
Str
.
walk_utf8
: Str, state, (state, U8 -> state) -> state
Str
.
release_excess_capacity
: Str -> Str
Str
.
with_prefix
: Str, Str -> Str
Str
.
contains
: Str, Str -> Bool
Str
.
drop_prefix
: Str, Str -> Str
Str
.
drop_suffix
: Str, Str -> Str
Num
.
Num
Num
.
Int
Num
.
Frac
Num
.
Signed128
Num
.
Signed64
Num
.
Signed32
Num
.
Signed16
Num
.
Signed8
Num
.
Unsigned128
Num
.
Unsigned64
Num
.
Unsigned32
Num
.
Unsigned16
Num
.
Unsigned8
Num
.
Integer
Num
.
I128
Num
.
I64
Num
.
I32
Num
.
I16
Num
.
I8
Num
.
U128
Num
.
U64
Num
.
U32
Num
.
U16
Num
.
U8
Num
.
Decimal
Num
.
Binary64
Num
.
Binary32
Num
.
FloatingPoint
Num
.
F64
Num
.
F32
Num
.
Dec
Num
.
e
: Frac *
Num
.
pi
: Frac *
Num
.
tau
: Frac *
Num
.
to_str
: Num * -> Str
Num
.
int_cast
: Int a -> Int b
Num
.
compare
: Num a, Num a -> [ LT, EQ, GT ]
Num
.
is_lt
: Num a, Num a -> Bool
Num
.
is_gt
: Num a, Num a -> Bool
Num
.
is_lte
: Num a, Num a -> Bool
Num
.
is_gte
: Num a, Num a -> Bool
Num
.
is_approx_eq
: Frac a, Frac a, { rtol ? Frac a, atol ? Frac a } -> Bool
Num
.
is_zero
: Num a -> Bool
Num
.
is_even
: Int a -> Bool
Num
.
is_odd
: Int a -> Bool
Num
.
is_positive
: Num a -> Bool
Num
.
is_negative
: Num a -> Bool
Num
.
to_frac
: Num * -> Frac *
Num
.
is_nan
: Frac * -> Bool
Num
.
is_infinite
: Frac * -> Bool
Num
.
is_finite
: Frac * -> Bool
Num
.
abs
: Num a -> Num a
Num
.
abs_diff
: Num a, Num a -> Num a
Num
.
neg
: Num a -> Num a
Num
.
add
: Num a, Num a -> Num a
Num
.
sub
: Num a, Num a -> Num a
Num
.
mul
: Num a, Num a -> Num a
Num
.
min
: Num a, Num a -> Num a
Num
.
max
: Num a, Num a -> Num a
Num
.
sin
: Frac a -> Frac a
Num
.
cos
: Frac a -> Frac a
Num
.
tan
: Frac a -> Frac a
Num
.
asin
: Frac a -> Frac a
Num
.
acos
: Frac a -> Frac a
Num
.
atan
: Frac a -> Frac a
Num
.
sqrt
: Frac a -> Frac a
Num
.
sqrt_checked
: Frac a -> Result (Frac a) [SqrtOfNegative]
Num
.
log
: Frac a -> Frac a
Num
.
log_checked
: Frac a -> Result (Frac a) [LogNeedsPositive]
Num
.
div
: Frac a, Frac a -> Frac a
Num
.
div_checked
: Frac a, Frac a -> Result (Frac a) [DivByZero]
Num
.
div_ceil
: Int a, Int a -> Int a
Num
.
div_ceil_checked
: Int a, Int a -> Result (Int a) [DivByZero]
Num
.
div_trunc
: Int a, Int a -> Int a
Num
.
div_trunc_checked
: Int a, Int a -> Result (Int a) [DivByZero]
Num
.
rem
: Int a, Int a -> Int a
Num
.
rem_checked
: Int a, Int a -> Result (Int a) [DivByZero]
Num
.
is_multiple_of
: Int a, Int a -> Bool
Num
.
bitwise_and
: Int a, Int a -> Int a
Num
.
bitwise_xor
: Int a, Int a -> Int a
Num
.
bitwise_or
: Int a, Int a -> Int a
Num
.
bitwise_not
: Int a -> Int a
Num
.
shift_left_by
: Int a, U8 -> Int a
Num
.
shift_right_by
: Int a, U8 -> Int a
Num
.
shift_right_zf_by
: Int a, U8 -> Int a
Num
.
round
: Frac * -> Int *
Num
.
floor
: Frac * -> Int *
Num
.
ceiling
: Frac * -> Int *
Num
.
pow
: Frac a, Frac a -> Frac a
Num
.
pow_int
: Int a, Int a -> Int a
Num
.
count_leading_zero_bits
: Int a -> U8
Num
.
count_trailing_zero_bits
: Int a -> U8
Num
.
count_one_bits
: Int a -> U8
Num
.
add_wrap
: Int range, Int range -> Int range
Num
.
add_saturated
: Num a, Num a -> Num a
Num
.
add_checked
: Num a, Num a -> Result (Num a) [Overflow]
Num
.
sub_wrap
: Int range, Int range -> Int range
Num
.
sub_saturated
: Num a, Num a -> Num a
Num
.
sub_checked
: Num a, Num a -> Result (Num a) [Overflow]
Num
.
mul_wrap
: Int range, Int range -> Int range
Num
.
mul_saturated
: Num a, Num a -> Num a
Num
.
mul_checked
: Num a, Num a -> Result (Num a) [Overflow]
Num
.
min_i8
: I8
Num
.
max_i8
: I8
Num
.
min_u8
: U8
Num
.
max_u8
: U8
Num
.
min_i16
: I16
Num
.
max_i16
: I16
Num
.
min_u16
: U16
Num
.
max_u16
: U16
Num
.
min_i32
: I32
Num
.
max_i32
: I32
Num
.
min_u32
: U32
Num
.
max_u32
: U32
Num
.
min_i64
: I64
Num
.
max_i64
: I64
Num
.
min_u64
: U64
Num
.
max_u64
: U64
Num
.
min_i128
: I128
Num
.
max_i128
: I128
Num
.
min_u128
: U128
Num
.
max_u128
: U128
Num
.
min_f32
: F32
Num
.
max_f32
: F32
Num
.
min_f64
: F64
Num
.
max_f64
: F64
Num
.
to_i8
: Int * -> I8
Num
.
to_i16
: Int * -> I16
Num
.
to_i32
: Int * -> I32
Num
.
to_i64
: Int * -> I64
Num
.
to_i128
: Int * -> I128
Num
.
to_u8
: Int * -> U8
Num
.
to_u16
: Int * -> U16
Num
.
to_u32
: Int * -> U32
Num
.
to_u64
: Int * -> U64
Num
.
to_u128
: Int * -> U128
Num
.
to_f32
: Num * -> F32
Num
.
to_f64
: Num * -> F64
Num
.
to_i8_checked
: Int * -> Result I8 [OutOfBounds]
Num
.
to_i16_checked
: Int * -> Result I16 [OutOfBounds]
Num
.
to_i32_checked
: Int * -> Result I32 [OutOfBounds]
Num
.
to_i64_checked
: Int * -> Result I64 [OutOfBounds]
Num
.
to_i128_checked
: Int * -> Result I128 [OutOfBounds]
Num
.
to_u8_checked
: Int * -> Result U8 [OutOfBounds]
Num
.
to_u16_checked
: Int * -> Result U16 [OutOfBounds]
Num
.
to_u32_checked
: Int * -> Result U32 [OutOfBounds]
Num
.
to_u64_checked
: Int * -> Result U64 [OutOfBounds]
Num
.
to_u128_checked
: Int * -> Result U128 [OutOfBounds]
Num
.
to_f32_checked
: Num * -> Result F32 [OutOfBounds]
Num
.
to_f64_checked
: Num * -> Result F64 [OutOfBounds]
Num
.
without_decimal_point
: Dec -> I128
Num
.
with_decimal_point
: I128 -> Dec
Num
.
f32_to_parts
: F32 -> { sign : Bool, exponent : U8, fraction : U32 }
Num
.
f64_to_parts
: F64 -> { sign : Bool, exponent : U16, fraction : U64 }
Num
.
f32_from_parts
: { sign : Bool, exponent : U8, fraction : U32 } -> F32
Num
.
f64_from_parts
: { sign : Bool, exponent : U16, fraction : U64 } -> F64
Num
.
from_bool
: Bool -> Num *
Num
.
nan_f32
: F32
Num
.
nan_f64
: F64
Num
.
infinity_f32
: F32
Num
.
infinity_f64
: F64
Bool
.
Eq
: implements is_eq : a, a -> Bool where a implements Eq
Bool
.
Bool
Bool
.
true
: Bool
Bool
.
false
: Bool
Bool
.
and
: Bool, Bool -> Bool
Bool
.
or
: Bool, Bool -> Bool
Bool
.
not
: Bool -> Bool
Bool
.
is_not_eq
: a, a -> Bool where a implements Eq
Result
.
Result
: [ Ok ok, Err err ]
Result
.
is_ok
: Result ok err -> Bool
Result
.
is_err
: Result ok err -> Bool
Result
.
with_default
: Result ok err, ok -> ok
Result
.
map_ok
: Result a err, (a -> b) -> Result b err
Result
.
map_err
: Result ok a, (a -> b) -> Result ok b
Result
.
map_both
: Result ok1 err1, (ok1 -> ok2), (err1 -> err2) -> Result ok2 err2
Result
.
map2
: Result a err, Result b err, (a, b -> c) -> Result c err
Result
.
try
: Result a err, (a -> Result b err) -> Result b err
Result
.
on_err
: Result a err, (err -> Result a other_err) -> Result a other_err
Result
.
on_err!
: Result a err, (err => Result a other_err) => Result a other_err
List
.
is_empty
: List * -> Bool
List
.
get
: List a, U64 -> Result a [OutOfBounds]
List
.
replace
: List a, U64, a -> { list : List a, value : a }
List
.
set
: List a, U64, a -> List a
List
.
update
: List a, U64, (a -> a) -> List a
List
.
append
: List a, a -> List a
List
.
append_if_ok
: List a, Result a * -> List a
List
.
prepend
: List a, a -> List a
List
.
prepend_if_ok
: List a, Result a * -> List a
List
.
len
: List * -> U64
List
.
with_capacity
: U64 -> List *
List
.
reserve
: List a, U64 -> List a
List
.
release_excess_capacity
: List a -> List a
List
.
concat
: List a, List a -> List a
List
.
last
: List a -> Result a [ListWasEmpty]
List
.
single
: a -> List a
List
.
repeat
: a, U64 -> List a
List
.
reverse
: List a -> List a
List
.
join
: List (List a) -> List a
List
.
contains
: List a, a -> Bool where a implements Eq
List
.
walk
: List elem, state, (state, elem -> state) -> state
List
.
walk_with_index
: List elem, state, (state, elem, U64 -> state) -> state
List
.
walk_with_index_until
: List elem, state, (state, elem, U64 -> [ Continue state, Break state ]) -> state
List
.
walk_backwards
: List elem, state, (state, elem -> state) -> state
List
.
walk_until
: List elem, state, (state, elem -> [ Continue state, Break state ]) -> state
List
.
walk_backwards_until
: List elem, state, (state, elem -> [ Continue state, Break state ]) -> state
List
.
walk_from
: List elem, U64, state, (state, elem -> state) -> state
List
.
walk_from_until
: List elem, U64, state, (state, elem -> [ Continue state, Break state ]) -> state
List
.
sum
: List (Num a) -> Num a
List
.
product
: List (Num a) -> Num a
List
.
any
: List a, (a -> Bool) -> Bool
List
.
all
: List a, (a -> Bool) -> Bool
List
.
keep_if
: List a, (a -> Bool) -> List a
List
.
drop_if
: List a, (a -> Bool) -> List a
List
.
count_if
: List a, (a -> Bool) -> U64
List
.
keep_oks
: List before, (before -> Result after *) -> List after
List
.
keep_errs
: List before, (before -> Result * after) -> List after
List
.
map
: List a, (a -> b) -> List b
List
.
map2
: List a, List b, (a, b -> c) -> List c
List
.
map3
: List a, List b, List c, (a, b, c -> d) -> List d
List
.
map4
: List a, List b, List c, List d, (a, b, c, d -> e) -> List e
List
.
map_with_index
: List a, (a, U64 -> b) -> List b
List
.
range
List
.
sort_with
: List a, (a, a -> [ LT, EQ, GT ]) -> List a
List
.
sort_asc
: List (Num a) -> List (Num a)
List
.
sort_desc
: List (Num a) -> List (Num a)
List
.
swap
: List a, U64, U64 -> List a
List
.
first
: List a -> Result a [ListWasEmpty]
List
.
take_first
: List elem, U64 -> List elem
List
.
take_last
: List elem, U64 -> List elem
List
.
drop_first
: List elem, U64 -> List elem
List
.
drop_last
: List elem, U64 -> List elem
List
.
drop_at
: List elem, U64 -> List elem
List
.
min
: List (Num a) -> Result (Num a) [ListWasEmpty]
List
.
max
: List (Num a) -> Result (Num a) [ListWasEmpty]
List
.
join_map
: List a, (a -> List b) -> List b
List
.
find_first
: List elem, (elem -> Bool) -> Result elem [NotFound]
List
.
find_last
: List elem, (elem -> Bool) -> Result elem [NotFound]
List
.
find_first_index
: List elem, (elem -> Bool) -> Result U64 [NotFound]
List
.
find_last_index
: List elem, (elem -> Bool) -> Result U64 [NotFound]
List
.
sublist
: List elem, { start : U64, len : U64 } -> List elem
List
.
intersperse
: List elem, elem -> List elem
List
.
starts_with
: List elem, List elem -> Bool where elem implements Eq
List
.
ends_with
: List elem, List elem -> Bool where elem implements Eq
List
.
split_at
: List elem, U64 -> { before : List elem, others : List elem }
List
.
split_on
: List a, a -> List (List a) where a implements Eq
List
.
split_on_list
: List a, List a -> List (List a) where a implements Eq
List
.
split_first
: List elem, elem -> Result { before : List elem, after : List elem } [NotFound] where elem implements Eq
List
.
split_last
: List elem, elem -> Result { before : List elem, after : List elem } [NotFound] where elem implements Eq
List
.
chunks_of
: List a, U64 -> List (List a)
List
.
map_try
: List elem, (elem -> Result ok err) -> Result (List ok) err
List
.
walk_try
: List elem, state, (state, elem -> Result state err) -> Result state err
List
.
concat_utf8
: List U8, Str -> List U8
List
.
for_each!
: List a, (a => {}) => {}
List
.
for_each_try!
: List a, (a => Result {} err) => Result {} err
List
.
walk!
: List elem, state, (state, elem => state) => state
List
.
walk_try!
: List elem, state, (state, elem => Result state err) => Result state err
Dict
.
Dict
Dict
.
empty
: {} -> Dict * *
Dict
.
with_capacity
: U64 -> Dict * *
Dict
.
reserve
: Dict k v, U64 -> Dict k v
Dict
.
release_excess_capacity
: Dict k v -> Dict k v
Dict
.
capacity
: Dict * * -> U64
Dict
.
single
: k, v -> Dict k v
Dict
.
from_list
: List ( k, v ) -> Dict k v
Dict
.
len
: Dict * * -> U64
Dict
.
is_empty
: Dict * * -> Bool
Dict
.
clear
: Dict k v -> Dict k v
Dict
.
map
: Dict k a, (k, a -> b) -> Dict k b
Dict
.
join_map
: Dict a b, (a, b -> Dict x y) -> Dict x y
Dict
.
walk
: Dict k v, state, (state, k, v -> state) -> state
Dict
.
walk_until
: Dict k v, state, (state, k, v -> [ Continue state, Break state ]) -> state
Dict
.
keep_if
: Dict k v, ( ( k, v ) -> Bool) -> Dict k v
Dict
.
drop_if
: Dict k v, ( ( k, v ) -> Bool) -> Dict k v
Dict
.
get
: Dict k v, k -> Result v [KeyNotFound]
Dict
.
contains
: Dict k v, k -> Bool
Dict
.
insert
: Dict k v, k, v -> Dict k v
Dict
.
remove
: Dict k v, k -> Dict k v
Dict
.
update
: Dict k v, k, (Result v [Missing] -> Result v [Missing]) -> Dict k v
Dict
.
to_list
: Dict k v -> List ( k, v )
Dict
.
keys
: Dict k v -> List k
Dict
.
values
: Dict k v -> List v
Dict
.
insert_all
: Dict k v, Dict k v -> Dict k v
Dict
.
keep_shared
: Dict k v, Dict k v -> Dict k v where v implements Eq
Dict
.
remove_all
: Dict k v, Dict k v -> Dict k v
Set
.
Set
Set
.
empty
: {} -> Set *
Set
.
with_capacity
: U64 -> Set *
Set
.
reserve
: Set k, U64 -> Set k
Set
.
release_excess_capacity
: Set k -> Set k
Set
.
single
: k -> Set k
Set
.
insert
: Set k, k -> Set k
Set
.
len
: Set * -> U64
Set
.
capacity
: Set * -> U64
Set
.
is_empty
: Set * -> Bool
Set
.
remove
: Set k, k -> Set k
Set
.
contains
: Set k, k -> Bool
Set
.
to_list
: Set k -> List k
Set
.
from_list
: List k -> Set k
Set
.
union
: Set k, Set k -> Set k
Set
.
intersection
: Set k, Set k -> Set k
Set
.
difference
: Set k, Set k -> Set k
Set
.
walk
: Set k, state, (state, k -> state) -> state
Set
.
map
: Set a, (a -> b) -> Set b
Set
.
join_map
: Set a, (a -> Set b) -> Set b
Set
.
walk_until
: Set k, state, (state, k -> [ Continue state, Break state ]) -> state
Set
.
keep_if
: Set k, (k -> Bool) -> Set k
Set
.
drop_if
: Set k, (k -> Bool) -> Set k
Decode
.
DecodeError
: [TooShort]
Decode
.
DecodeResult
Decode
.
Decoder
Decode
.
Decoding
: implements decoder : Decoder val fmt where val implements Decoding, fmt implements DecoderFormatting
Decode
.
DecoderFormatting
: implements u8 : Decoder U8 fmt where fmt implements DecoderFormatting u16 : Decoder U16 fmt where fmt implements DecoderFormatting u32 : Decoder U32 fmt where fmt implements DecoderFormatting u64 : Decoder U64 fmt where fmt implements DecoderFormatting u128 : Decoder U128 fmt where fmt implements DecoderFormatting i8 : Decoder I8 fmt where fmt implements DecoderFormatting i16 : Decoder I16 fmt where fmt implements DecoderFormatting i32 : Decoder I32 fmt where fmt implements DecoderFormatting i64 : Decoder I64 fmt where fmt implements DecoderFormatting i128 : Decoder I128 fmt where fmt implements DecoderFormatting f32 : Decoder F32 fmt where fmt implements DecoderFormatting f64 : Decoder F64 fmt where fmt implements DecoderFormatting dec : Decoder Dec fmt where fmt implements DecoderFormatting bool : Decoder Bool fmt where fmt implements DecoderFormatting string : Decoder Str fmt where fmt implements DecoderFormatting list : Decoder elem fmt -> Decoder (List elem) fmt where fmt implements DecoderFormatting record : state, (state, Str -> [ Keep (Decoder state fmt), Skip ]), (state, fmt -> Result val DecodeError) -> Decoder val fmt where fmt implements DecoderFormatting tuple : state, (state, U64 -> [ Next (Decoder state fmt), TooLong ]), (state -> Result val DecodeError) -> Decoder val fmt where fmt implements DecoderFormatting
Decode
.
custom
: (List U8, fmt -> DecodeResult val) -> Decoder val fmt where fmt implements DecoderFormatting
Decode
.
decode_with
: List U8, Decoder val fmt, fmt -> DecodeResult val where fmt implements DecoderFormatting
Decode
.
from_bytes_partial
: List U8, fmt -> DecodeResult val where val implements Decoding, fmt implements DecoderFormatting
Decode
.
from_bytes
: List U8, fmt -> Result val [Leftover (List U8)]DecodeError where val implements Decoding, fmt implements DecoderFormatting
Decode
.
map_result
: DecodeResult a, (a -> b) -> DecodeResult b
Encode
.
Encoder
Encode
.
Encoding
: implements to_encoder : val -> Encoder fmt where val implements Encoding, fmt implements EncoderFormatting
Encode
.
EncoderFormatting
: implements u8 : U8 -> Encoder fmt where fmt implements EncoderFormatting u16 : U16 -> Encoder fmt where fmt implements EncoderFormatting u32 : U32 -> Encoder fmt where fmt implements EncoderFormatting u64 : U64 -> Encoder fmt where fmt implements EncoderFormatting u128 : U128 -> Encoder fmt where fmt implements EncoderFormatting i8 : I8 -> Encoder fmt where fmt implements EncoderFormatting i16 : I16 -> Encoder fmt where fmt implements EncoderFormatting i32 : I32 -> Encoder fmt where fmt implements EncoderFormatting i64 : I64 -> Encoder fmt where fmt implements EncoderFormatting i128 : I128 -> Encoder fmt where fmt implements EncoderFormatting f32 : F32 -> Encoder fmt where fmt implements EncoderFormatting f64 : F64 -> Encoder fmt where fmt implements EncoderFormatting dec : Dec -> Encoder fmt where fmt implements EncoderFormatting bool : Bool -> Encoder fmt where fmt implements EncoderFormatting string : Str -> Encoder fmt where fmt implements EncoderFormatting list : List elem, (elem -> Encoder fmt) -> Encoder fmt where fmt implements EncoderFormatting record : List { key : Str, value : Encoder fmt } -> Encoder fmt where fmt implements EncoderFormatting tuple : List (Encoder fmt) -> Encoder fmt where fmt implements EncoderFormatting tag : Str, List (Encoder fmt) -> Encoder fmt where fmt implements EncoderFormatting
Encode
.
custom
: (List U8, fmt -> List U8) -> Encoder fmt where fmt implements EncoderFormatting
Encode
.
append_with
: List U8, Encoder fmt, fmt -> List U8 where fmt implements EncoderFormatting
Encode
.
append
: List U8, val, fmt -> List U8 where val implements Encoding, fmt implements EncoderFormatting
Encode
.
to_bytes
: val, fmt -> List U8 where val implements Encoding, fmt implements EncoderFormatting
Hash
.
Hash
: implements hash : hasher, a -> hasher where a implements Hash, hasher implements Hasher
Hash
.
Hasher
: implements add_bytes : a, List U8 -> a where a implements Hasher add_u8 : a, U8 -> a where a implements Hasher add_u16 : a, U16 -> a where a implements Hasher add_u32 : a, U32 -> a where a implements Hasher add_u64 : a, U64 -> a where a implements Hasher add_u128 : a, U128 -> a where a implements Hasher complete : a -> U64 where a implements Hasher
Hash
.
hash_str_bytes
Hash
.
hash_list
Hash
.
hash_bool
: a, Bool -> a where a implements Hasher
Hash
.
hash_i8
: a, I8 -> a where a implements Hasher
Hash
.
hash_i16
: a, I16 -> a where a implements Hasher
Hash
.
hash_i32
: a, I32 -> a where a implements Hasher
Hash
.
hash_i64
: a, I64 -> a where a implements Hasher
Hash
.
hash_i128
: a, I128 -> a where a implements Hasher
Hash
.
hash_dec
: a, Dec -> a where a implements Hasher
Hash
.
hash_unordered
Box
.
box
: a -> Box a
Box
.
unbox
: Box a -> a
Inspect
.
KeyValWalker
: collection, state, (state, key, val -> state) -> state
Inspect
.
ElemWalker
: collection, state, (state, elem -> state) -> state
Inspect
.
InspectFormatter
: implements init : {} -> f where f implements InspectFormatter tag : Str, List (Inspector f) -> Inspector f where f implements InspectFormatter tuple : List (Inspector f) -> Inspector f where f implements InspectFormatter record : List { key : Str, value : Inspector f } -> Inspector f where f implements InspectFormatter bool : Bool -> Inspector f where f implements InspectFormatter str : Str -> Inspector f where f implements InspectFormatter list : list, ElemWalker state list elem, (elem -> Inspector f) -> Inspector f where f implements InspectFormatter set : set, ElemWalker state set elem, (elem -> Inspector f) -> Inspector f where f implements InspectFormatter dict : dict, KeyValWalker state dict key value, (key -> Inspector f), (value -> Inspector f) -> Inspector f where f implements InspectFormatter opaque : * -> Inspector f where f implements InspectFormatter function : * -> Inspector f where f implements InspectFormatter u8 : U8 -> Inspector f where f implements InspectFormatter i8 : I8 -> Inspector f where f implements InspectFormatter u16 : U16 -> Inspector f where f implements InspectFormatter i16 : I16 -> Inspector f where f implements InspectFormatter u32 : U32 -> Inspector f where f implements InspectFormatter i32 : I32 -> Inspector f where f implements InspectFormatter u64 : U64 -> Inspector f where f implements InspectFormatter i64 : I64 -> Inspector f where f implements InspectFormatter u128 : U128 -> Inspector f where f implements InspectFormatter i128 : I128 -> Inspector f where f implements InspectFormatter f32 : F32 -> Inspector f where f implements InspectFormatter f64 : F64 -> Inspector f where f implements InspectFormatter dec : Dec -> Inspector f where f implements InspectFormatter
Inspect
.
Inspector
Inspect
.
custom
: (f -> f) -> Inspector f where f implements InspectFormatter
Inspect
.
apply
: Inspector f, f -> f where f implements InspectFormatter
Inspect
.
Inspect
: implements to_inspector : val -> Inspector f where val implements Inspect, f implements InspectFormatter
Inspect
.
inspect
: val -> f where val implements Inspect, f implements InspectFormatter
Inspect
.
to_str
: val -> Str where val implements Inspect
Exposed Modules
LLM docs
Str
Num
Bool
Result
List
Dict
Set
Decode
Encode
Hash
Box
Inspect