Weave documentation
Rust referencedbrowser

dbrowser · commands::spaces

Source declarations, signatures and documentation for commands::spaces.

Source: sigil/weave/tools/dbrowser/src-tauri/src/commands/spaces.rs. SHA-256: e93fbebd855aa5f7801d132313a933a2737158eb7b67f961875d524c578e3d5c.

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.

commands::spaces::Space

A named space backed by a Locus drive.

#[derive(Debug, Serialize)]
pub struct Space {
/// The space / drive name.

pub name: String,
/// The weave:// URL for this space.

pub url: String,
/// Hex-encoded discovery key for peer replication (empty for legacy spaces).

pub discovery_key: String
}

Source line: 13.

commands::spaces::list_spaces

List all available spaces.

Combines Locus drives from the WeaveNode with any legacy filesystem directories found under ~/.dbrowser/sites/ that are not already tracked as Locus drives.

#[tauri::command]
pub async fn list_spaces(state: State<'_, AppState>) -> Result<Vec<Space>, String>;

Source line: 48.

commands::spaces::create_space

Create a new space backed by a Locus drive.

  1. Opens a Locus drive via the WeaveNode.
  2. Derives a discovery key from the drive name.
  3. Announces on DHT for peer discovery (best-effort).
  4. Returns the Space with its weave:// URL and discovery key.
#[tauri::command]
pub fn create_space(name: String, state: State<'_, AppState>) -> Result<Space, String>;

Source line: 98.

On this page