Skip to main content

Crate object_rainbow

Crate object_rainbow 

Source

Re-exports§

pub use self::enumkind::Enum;
pub use self::hash::Hash;
pub use self::hash::OptionalHash;

Modules§

addressed
ascii
decr_byte_niche
default_chain
default_terminated
enumkind
extra_none_terminated
extra_option
extras
ff
fn_fetch
hash
hashed
incr_byte_niche
inline_extra
length_prefixed
local_fetch
map_extra
monostate_headers
nested_mut
niche_cut
none_terminated
numeric
object_marker
parse_extra
partial_byte_tag
refless
runtime_array
sequence
tuple_extra
tuple_of_arrays
u63
with_repr
zero_terminated

Macros§

assert_impl
Assert that some trait is implemented.
error_consistency
Construct Error::Consistency.
error_fetch
Construct Error::Fetch.
error_operation
Construct Error::Operation.
error_parse
Construct Error::Parse.

Structs§

Address
Address within a PointInput.
AsRead
std::io::Read representation of a ParseInput.
AsWrite
std::io::Write representation of an Output.
DiffHashes
Hashes
ToOutput representing an object’s [Hash]es list.
Input
Canonical implementation of PointInput.
Mangled
NicheForUnsized
Special Niche to force use of a tag without any padding.
NoNiche
[MaybeNiche] asserting that V is a fake niche.
OneNiche
Niche filled with 0xFF bytes.
OrderedByBytes
ReflessInput
Simplest provided implementation of ParseInput.
SomeNiche
[MaybeNiche] asserting that T is a true niche.
Tags
WithHash
ZeroNiche
Niche filled with 0x00 bytes.
ZeroNoNiche
Already occupied/unusable byte representation filled with 0x00 bytes.

Enums§

Error
Errors encountered during fetching an object. Mostly related to parsing.

Constants§

HASH_SIZE
SHA-256 hash size in bytes.

Traits§

AsAny
Trait for contextually using Any. Can itself be implemented for non-'static and ?Sized types, and is dyn-compatible.
AsExtra
ByteOrd
Traits for which total order matches that of ToOutput::vec.
CanonicalExtra
Component
DefaultHash
Equivalent
Implemented if both types have the exact same layout. This implies having the same MaybeHasNiche::MnArray.
EquivalentFor
ExtraFor
This Extra can be used to parse T via ParseSliceExtra::parse_slice_extra.
Fetch
Application-facing traversal.
FetchBytes
Main machinery responsible for turning content-addressed structures into something we can actually traverse.
FromOutput
FromSized
FullHash
Inline
InlineOutput
Marker trait indicating that ToOutput result cannot be extended (no value, when represented as a Vec<u8>, may be a prefix of another value). Effectively means prefix property.
ListHashes
Semantically part of Topological but decoupled for simpler recursive bounds.
MaybeHasNiche
This might contain a valid Niche.
MinNiche
This niche precedes all non-niche values.
Monostate
Niche
True or fake (placeholder) niche.
Object
OptionOutput
Provide ToOutput for Option<Self>.
OptionParse
Provide Parse for Option<Self>.
OptionParseInline
Provide ParseInline for Option<Self>.
Output
OutputExt
Parse
This can be parsed by consuming the whole rest of the input.
ParseAs
ParseAsExtra
ParseInline
This can be parsed from an input, after which we can correctly parse something else.
ParseInput
ParseSlice
ParseSliceExtra
ParseSliceRefless
PointInput
PointVisitor
Used in Topological::traverse.
RainbowIterator
ReflessInline
ReflessObject
Resolve
Something that can resolve Addresses to ByteNodes.
SignificantLength
Singular
SingularFetch
Size
SizeExt
Tagged
Compile-time type information used to differentiate objects even when they have same serialised data. Typically empty.
TagsHash
ToCanonicalExtra
ToOutput
Values of this type can be uniquely represented as a Vec<u8>.
Topological
Central trait responsible for providing access to walking the object tree.
Topology
Traversible
TryDefault

Functions§

from_equivalent

Type Aliases§

ByteNode
Returned by Resolve and FetchBytes. Represents traversal through the object graph.
FailFuture
Fallible future type yielding either T or Error.
Result
Default output for fallible functions.
TopoVec

Attribute Macros§

derive_for_wrapped
pod

Derive Macros§

ByteOrd
CanonicalExtra
Enum
InlineOutput
ListHashes
MaybeHasNiche
Parse
ParseAsInline
ParseInline
Size
Tagged
ToCanonicalExtra
ToOutput
Topological