Crate helia_interface

Crate helia_interface 

Source
Expand description

§Helia Interface

The API defined by a Helia node

This crate provides the core interfaces and traits that define the Helia IPFS implementation.

§Example

use helia_interface::Helia;

async fn do_something<H: Helia>(helia: H) {
    // use helia node functions here
}

Re-exports§

pub use blocks::*;
pub use errors::*;
pub use pins::*;
pub use routing::*;

Modules§

blocks
Block storage and retrieval interfaces
errors
Error types for Helia operations
pins
Pinning interface for content addressing
routing
Routing interface for peer and content discovery

Structs§

AbortOptions
Options that include an abort signal for canceling operations
GcOptions
Garbage collection options
ProgressEvent
Progress event for tracking operation status
ProgressOptions
Options for operations that support progress tracking

Enums§

GcEvent
Events emitted during garbage collection
HeliaEvent
Events emitted by a Helia node

Traits§

Codec
IPLD codec trait
CodecLoader
Codec loader for loading IPLD codecs
ComponentLogger
Component logger for structured logging
Datastore
Key-value datastore interface
Hasher
Multihash hasher trait
HasherLoader
Hasher loader for loading multihash hashers
Helia
Non-generic Helia trait for backward compatibility and trait objects
HeliaWithLibp2p
Generic Helia trait with libp2p type parameter for concrete implementations
Metrics
Metrics collection interface
WithBitswap
Trait for NetworkBehaviours that include Bitswap

Type Aliases§

Await
Type alias for awaitable results
AwaitIterable
Type alias for async iterables/streams
HeliaEventReceiver
Type alias for event receiver