Module confinement

Source
Expand description

Confinement puts a constraint on the number of elements within a collection.

Macros§

confined_blobDeprecated
Helper macro to construct confined blob
confined_bmapDeprecated
Helper macro to construct confined BTreeMap of a given type
confined_bsetDeprecated
Helper macro to construct confined BTreeSet of a given type
confined_mapDeprecated
Helper macro to construct confined HashMap of a given type
confined_sDeprecated
Helper macro to construct confined string
confined_setDeprecated
Helper macro to construct confined HashSet of a given type
confined_vecDeprecated
Helper macro to construct confined vector of a given type
medium_blob
Helper macro to construct confined blob of a MediumBlob type
medium_bmap
Helper macro to construct confined BTreeMap of a MediumOrdMap type
medium_bset
Helper macro to construct confined BTreeSet of a MediumOrdSet type
medium_map
Helper macro to construct confined HashMap of a MediumHashMap type
medium_s
Helper macro to construct confined string of a MediumString type
medium_set
Helper macro to construct confined HashSet of a MediumHashSet type
medium_vec
Helper macro to construct confined vector of a MediumVec type
small_blob
Helper macro to construct confined blob of a SmallBlob type
small_bmap
Helper macro to construct confined BTreeMap of a SmallOrdMap type
small_bset
Helper macro to construct confined BTreeSet of a SmallOrdSet type
small_map
Helper macro to construct confined HashMap of a SmallHashMap type
small_s
Helper macro to construct confined string of a SmallString type
small_set
Helper macro to construct confined HashSet of a SmallHashSet type
small_vec
Helper macro to construct confined vector of a SmallVec type
tiny_blob
Helper macro to construct confined blob of a TinyBlob type
tiny_bmap
Helper macro to construct confined BTreeMap of a TinyOrdMap type
tiny_bset
Helper macro to construct confined BTreeSet of a TinyOrdSet type
tiny_map
Helper macro to construct confined HashMap of a TinyHashMap type
tiny_s
Helper macro to construct confined string of a TinyString type
tiny_set
Helper macro to construct confined HashSet of a TinyHashSet type
tiny_vec
Helper macro to construct confined vector of a TinyVec type

Structs§

Confined
The confinement for the collection.

Enums§

AsciiError
Errors generated by constructing confined AsciiString from str.
Error
Errors when confinement constraints were not met.

Constants§

ONE
Constant for a minimal size of a confined collection.
U8
Constant for a maximal size of a confined collection equal to u8::MAX.
U16
Constant for a maximal size of a confined collection equal to u16::MAX.
U24
Constant for a maximal size of a confined collection equal to u24::MAX.
U32
Constant for a maximal size of a confined collection equal to u32::MAX.
U64
Constant for a maximal size of a confined collection equal to u64::MAX.
ZERO
Constant for a minimal size of a confined collection.

Traits§

Collection
Trait implemented by a collection types which need to support collection confinement.
KeyedCollection
Trait implemented by key-value maps which need to support collection confinement.

Type Aliases§

ConfinedAscii
Confined AsciiString.
ConfinedBlob
Confined Vec<u8>.
ConfinedDeque
Confined VecDeque.
ConfinedHashMap
Confined HashMap.
ConfinedHashSet
Confined HashSet.
ConfinedOrdMap
Confined BTreeMap.
ConfinedOrdSet
Confined BTreeSet.
ConfinedString
Confined String.
ConfinedVec
Confined Vec.
LargeAscii
AsciiString with maximum 2^32-1 characters.
LargeBlob
Vec<u8> with maximum 2^32-1 characters.
LargeDeque
VecDeque with maximum 2^32-1 items of type T.
LargeHashMap
HashMap with maximum 2^32-1 items.
LargeHashSet
HashSet with maximum 2^32-1 items of type T.
LargeOrdMap
BTreeMap with maximum 2^32-1 items.
LargeOrdSet
BTreeSet with maximum 2^32-1 items of type T.
LargeString
String with maximum 2^32-1 characters.
LargeVec
Vec with maximum 2^32-1 items of type T.
MediumAscii
AsciiString with maximum 2^24-1 characters.
MediumBlob
Vec<u8> with maximum 2^24-1 characters.
MediumDeque
VecDeque with maximum 2^24-1 items of type T.
MediumHashMap
HashMap with maximum 2^24-1 items.
MediumHashSet
HashSet with maximum 2^24-1 items of type T.
MediumOrdMap
BTreeMap with maximum 2^24-1 items.
MediumOrdSet
BTreeSet with maximum 2^24-1 items of type T.
MediumString
String with maximum 2^24-1 characters.
MediumVec
Vec with maximum 2^24-1 items of type T.
NonEmptyAscii
AsciiString which contains at least a single character.
NonEmptyBlob
Vec<u8> which contains at least a single character.
NonEmptyDeque
VecDeque which contains at least a single item.
NonEmptyHashMap
HashMap which contains at least a single item.
NonEmptyHashSet
HashSet which contains at least a single item.
NonEmptyOrdMap
BTreeMap which contains at least a single item.
NonEmptyOrdSet
BTreeSet which contains at least a single item.
NonEmptyString
String which contains at least a single character.
NonEmptyVec
Vec which contains at least a single item.
SmallAscii
AsciiString with maximum 2^16-1 characters.
SmallBlob
Vec<u8> with maximum 2^16-1 characters.
SmallDeque
VecDeque with maximum 2^16-1 items of type T.
SmallHashMap
HashMap with maximum 2^16-1 items.
SmallHashSet
HashSet with maximum 2^16-1 items of type T.
SmallOrdMap
BTreeMap with maximum 2^16-1 items.
SmallOrdSet
BTreeSet with maximum 2^16-1 items of type T.
SmallString
String with maximum 2^16-1 characters.
SmallVec
Vec with maximum 2^16-1 items of type T.
TinyAscii
AsciiString with maximum 255 characters.
TinyBlob
Vec<u8> with maximum 255 characters.
TinyDeque
VecDeque with maximum 255 items of type T.
TinyHashMap
HashMap with maximum 255 items.
TinyHashSet
HashSet with maximum 255 items of type T.
TinyOrdMap
BTreeMap with maximum 255 items.
TinyOrdSet
BTreeSet with maximum 255 items of type T.
TinyString
String with maximum 255 characters.
TinyVec
Vec with maximum 255 items of type T.