Weave documentation
Rust referencel1fe-weave-core

l1fe-weave-core · utils

Source declarations, signatures and documentation for utils.

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/utils/mod.rs. SHA-256: 40161553bb64d5d86ac40149a98cba86ef3694daef3b4d09462e0cb38963307f.

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.

utils::generate_id

Generate a unique ID

pub fn generate_id() -> String;

Source line: 6.

utils::format_did

Format a DID

pub fn format_did(prefix: &str, id: &str) -> String;

Source line: 11.

utils::parse_did

Parse a DID

pub fn parse_did(did: &str) -> Result<(&str, &str)>;

Source line: 16.

utils::now

Current timestamp

pub fn now() -> chrono::DateTime<chrono::Utc>;

Source line: 28.

utils::sleep

Sleep for a duration

pub async fn sleep(millis: u64);

Source line: 33.

On this page