Skip to main content

Crate mercy

Crate mercy 

Source
Expand description

Owned pair of immutable strings.

Uses lots of generics to be customisable. If you plan to use these types in your own crate, you should use type aliases to avoid having to specify generics all the time.

If you want a Spair, you can either construct one directly with Spair::new or act to build one.

If you’d like to support more string buffer types, you should see the traits Stringy and Stringable. You can enable ArrayString support via the arrayvec feature.

Structs§

Act
Builder made with act.
Custom
Wrapper for IncompleteError and DuplicateError that allows naming the two strings.
DuplicateError
Error when there were duplicate keys provided to a Spair.
Spair
String pair, stored and displayed with separator Sep. (by default, empty)

Enums§

BuildError
Error when building a Spair with Act::finish.
Duplicated
Duplicated key returned by DuplicateError::which.
IncompleteError
Error when building an incomplete Spair via Act::finish.

Traits§

Stringable
Generalisation over String that includes immutable and non-growable containers.
Stringy
Generalisation over String.

Functions§

act
Lets you build a Spair.

Type Aliases§

CustomDuplicateError
Alias for Custom<DuplicateError<S>, K1, K2>.
CustomIncompleteError
Alias for Custom<IncompleteError<S>, K1, K2>.