Rust referenceweave-dht
weave-dht · methods
Source declarations, signatures and documentation for methods.
Source: sigil/weave/network/weave-dht/src/methods.rs. SHA-256: 0b8679ed260328e2897efb441787e57342a500e638b9924647240e778e464d77.
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.
methods::MethodAdapter
#[async_trait]
pub trait MethodAdapter: Send + Sync {
fn name(&self) -> &'static str;
async fn publish(&self, envelope: &DidEnvelope) -> Result<()>;
async fn resolve(&self, did: &str) -> Result<Option<DidEnvelope>>;
}Source line: 12.
methods::AdapterRegistry
pub struct AdapterRegistry {
}Source line: 18.
methods::AdapterRegistry::new
pub fn new() -> Self;Source line: 23.
methods::AdapterRegistry::register
pub fn register(&self, adapter: Arc<dyn MethodAdapter>);Source line: 29.
methods::AdapterRegistry::get
pub fn get(&self, name: &str) -> Option<Arc<dyn MethodAdapter>>;Source line: 33.
methods::DhtMethodAdapter
pub struct DhtMethodAdapter {
}Source line: 44.
methods::DhtMethodAdapter::new
pub fn new(handle: DhtHandle, config: WeaveDhtConfig) -> Self;Source line: 50.
methods::MarsConfig
#[derive(Clone)]
pub struct MarsConfig {
pub endpoint: String,
pub bearer_token: Option<String>
}Source line: 79.
methods::MarsAdapter
pub struct MarsAdapter {
}Source line: 84.
methods::MarsAdapter::new
pub fn new(dht: DhtMethodAdapter, mars: Option<MarsConfig>) -> Self;Source line: 90.