Skip to main content

Method

Enum Method 

Source
#[non_exhaustive]
pub enum Method {
Show 28 variants GetContent, GetCapsule, GetModule, GetManifest, GetMetadata, ListCapsules, GetProof, GetProofStatus, GetAnchoredRoot, GetCollection, ListCollectionItems, Health, Methods, GetNetworkInfo, GetPeers, Announce, GetAvailability, ListInventory, FetchRange, Stage, CacheGetConfig, CacheSetCapBytes, CacheClear, CacheListCached, CacheRemoveCached, CacheFetchAndCache, ControlPeerStatus, RpcDiscover,
}
Expand description

A DIG-node RPC method.

#[non_exhaustive] so adding a method in a minor release is additive. Convert to/from the wire name with Method::name / Method::from_name.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

GetContent

dig.getContent — a verified resource-window read.

§

GetCapsule

dig.getCapsule — the whole .dig module for (store, root).

§

GetModule

dig.getModule — alias of GetCapsule.

§

GetManifest

dig.getManifest — the public discovery manifest resource.

§

GetMetadata

dig.getMetadata — the plaintext metadata manifest (never encrypted).

§

ListCapsules

dig.listCapsules — the confirmed capsule list (discovery metadata).

§

GetProof

dig.getProof — the real inclusion proof + execution-proof status.

§

GetProofStatus

dig.getProofStatus — poll a real execution-proof job by id.

§

GetAnchoredRoot

dig.getAnchoredRoot — resolve a store’s chain-anchored tip root. (Also peer-reachable.)

§

GetCollection

dig.getCollection — collection-level facts for a set of NFT launchers. (Also peer-reachable.)

§

ListCollectionItems

dig.listCollectionItems — a page of resolved collection items. (Also peer-reachable.)

§

Health

dig.health — liveness + capability summary.

§

Methods

dig.methods — the implemented method names (agent self-describe).

§

GetNetworkInfo

dig.getNetworkInfo — this node’s peer-network posture.

§

GetPeers

dig.getPeers — the peers this node knows (peer exchange).

§

Announce

dig.announce — accept a peer announcement.

§

GetAvailability

dig.getAvailability — batch presence check across stores/roots/capsules.

§

ListInventory

dig.listInventory — enumerate what this node serves.

§

FetchRange

dig.fetchRange — a single verified range frame of a resource.

§

Stage

dig.stage — compile a local folder into a capsule .dig in-process.

§

CacheGetConfig

cache.getConfig — the local-cache config.

§

CacheSetCapBytes

cache.setCapBytes — set the cache size cap.

§

CacheClear

cache.clear — clear the cache.

§

CacheListCached

cache.listCached — the durable module inventory.

§

CacheRemoveCached

cache.removeCached — remove one cached capsule.

§

CacheFetchAndCache

cache.fetchAndCache — fetch + cache one capsule.

§

ControlPeerStatus

control.peerStatus — the peer-network status snapshot.

§

RpcDiscover

rpc.discover — the OpenRPC self-describe document.

Implementations§

Source§

impl Method

Source

pub const ALL: &'static [Method]

Every method, in catalogue order.

Source

pub const fn name(self) -> &'static str

The stable JSON-RPC wire name.

Source

pub fn from_name(name: &str) -> Option<Method>

Parse a wire name into a Method, or None for an unknown method (the caller answers -32601).

Source

pub const fn tier(self) -> Tier

The method’s PRIMARY access Tier.

Note: a PublicRead method may still be peer-reachable — see is_peer_reachable. The tier is the method’s canonical home, the allowlist is the security boundary.

Source

pub const fn is_peer_reachable(self) -> bool

Whether this method is reachable over the mTLS peer surface.

This mirrors the canonical node’s is_peer_reachable_method byte-for-byte (digstore dig-node peer.rs). It is an ALLOWLIST: adding a method here is a deliberate security decision — it exposes the method to any remote peer (the peer verifier authenticates a peer_id, it does NOT authorize). Management/mutation methods (cache.*, control.*, dig.stage) are NEVER peer-reachable.

Source

pub const fn summary(self) -> &'static str

A one-line human summary (drives the OpenRPC method summary).

Source

pub fn peer_reachable_names() -> Vec<&'static str>

The method names reachable over the peer surface, in catalogue order — the exact allowlist a server hands its peer responder.

Trait Implementations§

Source§

impl Clone for Method

Source§

fn clone(&self) -> Method

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Method

Source§

impl Debug for Method

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Method

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Method

Source§

impl Hash for Method

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Method

Source§

fn eq(&self, other: &Method) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Method

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.