Skip to main content

Crate co_primitives

Crate co_primitives 

Source

Modules§

serde_map_as_list

Macros§

serde_string_enum
Adds display and to_string implementation to serde enum types.
tag
Tag inline macro.
tags
Tags inline macro.

Structs§

AbsolutePath
Absolute Path.
AbsolutePathOwned
Owned Absolute Path.
Block
Block
BlockLinks
BlockSerializer
DagCbor Block Serializer/Deserializer.
BlockStat
BlockStorageCloneSettings
Clock
Lamport Clock.
CoCid
CoConnectivity
CoId
CO Unique ID.
CoInviteMetadata
CoList
CoList stored values in a sequence.
CoListIndex
CoList index - non continous.
CoListTransaction
CoMap
CoMapTransaction
CoSet
CoSetTransaction
Components
Path components.
CoreBlockStorage
CoreName
Typed core name.
DefaultNodeSerializer
DefaultParams
DynamicCoDate
Entry
GuardInput
GuardOutput
IgnoreFilter
Filter out Cid links.
JoinFilter
LazyTransaction
Lazy transaction that only opens the transaction when used.
Link
A (serializable) typed link.
LsmTreeMap
LSM Tree Instance.
LsmTreeMapSettings
MappedCid
Mapped Cid.
MonotonicCoDate
MultiCodecError
Multi Codec Error.
NetworkCoHeads
CO Heads protocol.
NetworkDidDiscovery
DID Discovery protocol.
NetworkPeer
Direct peer connection.
NetworkRendezvous
Rendezvouz protocol.
NodeBuilder
Create a balances merkle tree of Node blocks.
NodeStream
Stream node items.
OptionLink
A (serializable) typed link.
Path
Path. Can be relative or absolute.
PathOwned
Owned Path.
ReducerAction
ReducerInput
ReducerOutput
RelativePath
Relative Path.
RelativePathOwned
OWned Relative Path.
Secret
Simple wrapper type for secrents to not escape them.
SignedEntry
StaticCoDate
Tags
Tags.
TotalFloat64
f64 float wich uses total order from IEEE 754 (2008 revision).
WeakCid
A CID that will be serialized as just bytes and will not be returned by crate::BlockLinks.
WeakCoReferenceFilter
Filter out CoReference::Weak blocks.
WithCoMetadata

Enums§

BlockDiff
BlockError
BlockSerializerError
CborError
CoInvite
Sets behaviour for incoming invites
CoJoin
Sets behaviour for join requests
CoNetwork
CO Participant network feature(s) tag.
CoReference
Wrapps a reference/link/Cid and applies attributes useful in context of a Co.
CoTimeout
CO timeout setting.
Component
Path component.
DiagnosticMessage
JsonError
KnownMultiCodec
Known Muiticodecs See: https://github.com/multiformats/multicodec/blob/master/table.csv
KnownTags
Metadata
MultiCodec
MultiCodec matching utility.
Network
Network service connectivity description.
Node
NodeBuilderError
NodeReaderError
OptionMappedCid
Simple type to make mapped Cid’s clear.
PathError
StorageError
TagValue
Tag Value
TagsExpr
Tags match pattern.

Constants§

CID_MAX_SIZE

Traits§

AnyBlockStorage
Utility type to document that any block storage implementation is accepted.
BlockDiffFollow
BlockLinksFilter
BlockStorage
BlockStorageExt
BlockStorageStoreParams
Block storage with custom store params.
CloneWithBlockStorageSettings
CoDate
CoMetadata
Special CO metadata.
CoTryStreamExt
IsDefault
Simple trait to check if the current value is the default.
KnownTag
Linkable
NodeSerializer
PathExt
Storage
Storage interface.
StoreParams
Streamable
TagMatcher
A type that can be matched against a tag.
TagPattern
A type that can be used as pattern to be matched against a TagMatcher.
Transactionable
Collection which supports transactions.

Functions§

block_diff
Find added/removed references in blocks. If a Cid is referenced multiple times it will also returnes multiple times. This diff works recursively - all added/removed Cid at any depth will be returned. However there is a look-ahead depth limit, how many nodes are looked down to reuse references (defaults to 1).
block_diff_added_with_parent
Find added references in blocks with its parent. This diff works recursively - all added Cid at any depth will be returned. However there is a look-ahead depth limit, how many nodes are looked down to reuse references (defaults to 1).
cid_to_raw
from_cbor
Deserialize from CBOR (using dag-json).
from_json
Deserialize from JSON string (using dag-json).
from_json_string
Deserialize from JSON string (using dag-json).
node_reader
raw_to_cid
reducer_action_core
Read core property from a ReducerAction.
reducer_action_core_from_storage
Read core property from a ReducerAction.
to_cbor
Serialize value to CBOR string (using dag-json).
to_json
Serialize value to JSON string (using dag-json).
to_json_string
Serialize value to JSON string (using dag-json).
unixfs_add
Add stream as unixfs file to storage. The last CID in the result is the root.
unixfs_cat_buffer
Read unixfs file into buffer.
unixfs_encode_buffer
Encode buffer into blocks. The last block in the result is the root.
unixfs_stream
Read unixfs file as chunked stream.

Type Aliases§

CoDateRef
Date
Did
RawCid
Tag
Tag. Represents a generic metadata/configuration key value pair.