Weave documentation
Rust referencel1fe-weave-core

l1fe-weave-core · storage::nexus

Source declarations, signatures and documentation for storage::nexus.

Reviewed implementation boundary: Some core wrappers derive transport keys from DID strings. Do not infer secret key custody or authenticated peers from a supplied DID string; inspect the chosen wrapper and transport configuration. See /libraries/weave-core/overview.

Source: sigil/weave/libs/weave-core/src/storage/nexus.rs. SHA-256: 2c96de4816749dd9d98503586c573fce7c8be7858619658d6166efdf1b1f766c.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

storage::nexus::NexusMetadata

Nexus metadata

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NexusMetadata {
/// Nexus DID

pub did: String,
/// Name

pub name: String,
/// Owner DID

pub owner: Did,
/// Creation time

pub created_at: DateTime<Utc>,
/// Input strand DIDs

pub inputs: Vec<String>,
/// Ordering strategy

pub ordering: OrderingStrategy
}

Source line: 17.

storage::nexus::OrderingStrategy

Ordering strategy for entries

#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum OrderingStrategy {
    /// Order by timestamp
    Timestamp,
    /// Order by strand then index
    StrandIndex,
    /// Custom ordering function
    Custom(String),
}

Source line: 34.

storage::nexus::NexusEntry

Nexus entry combining strand entry with source info

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct NexusEntry {
/// Source strand DID

pub strand_did: String,
/// Original strand entry

pub entry: StrandEntry,
/// Nexus index

pub nexus_index: u64
}

Source line: 45.

storage::nexus::NexusQuery

Query parameters for nexus views

#[derive(Debug, Clone, Default)]
pub struct NexusQuery {
/// Start index

pub start: Option<u64>,
/// Maximum number of entries

pub limit: Option<usize>,
/// Filter by strand DID

pub strand_filter: Option<String>,
/// Time range filter

pub time_range: Option<(DateTime<Utc>, DateTime<Utc>)>
}

Source line: 56.

storage::nexus::NexusView

Nexus view

pub struct NexusView {

}

Source line: 68.

storage::nexus::Nexus

Main Nexus interface

pub struct Nexus {

}

Source line: 78.

storage::nexus::Nexus::new

Create a new Nexus instance

pub fn new(
        owner_did: Option<Did>,
        _adapter: Arc<dyn weave_identity::WeaveIdentityAdapter>,
    ) -> Self;

Source line: 87.

storage::nexus::Nexus::create_view

Create a new nexus view

pub async fn create_view(
        &self,
        name: String,
        owner: Did,
        inputs: Vec<String>,
        ordering: OrderingStrategy,
    ) -> Result<String>;

Source line: 98.

storage::nexus::Nexus::add_strand

Add a strand to a nexus view

pub async fn add_strand(&self, nexus_did: &str, strand: Arc<Strand>) -> Result<()>;

Source line: 132.

storage::nexus::Nexus::remove_strand

Remove a strand from a nexus view

pub async fn remove_strand(&self, nexus_did: &str, strand_did: &str) -> Result<()>;

Source line: 156.

storage::nexus::Nexus::query

Query entries from a nexus view

pub async fn query(&self, nexus_did: &str, query: NexusQuery) -> Result<Vec<NexusEntry>>;

Source line: 177.

storage::nexus::Nexus::get_metadata

Get nexus view metadata

pub fn get_metadata(&self, nexus_did: &str) -> Result<NexusMetadata>;

Source line: 289.

storage::nexus::Nexus::list_views

List all nexus views

pub fn list_views(&self) -> Vec<NexusMetadata>;

Source line: 300.

On this page