Skip to main content

Client

Struct Client 

Source
pub struct Client { /* private fields */ }
Expand description

An optional local service connection, trusting the configured local operator. Construction performs no I/O. Each operation opens one bounded connection.

Implementations§

Source§

impl Client

Source

pub fn new(address: SocketAddr, token: String) -> Result<Self, Error>

Source

pub fn status(&self) -> Result<ServiceStatus, Error>

Typed service status reported by the local operator, without verifying its claims.

Source

pub fn status_json(&self) -> Result<Value, Error>

Raw status JSON reported by the local operator, without verifying its claims.

Source

pub fn record(&self, txid: Txid) -> Result<Option<ArchivedRecord>, Error>

Read locally archived data. None means HTTP 404 (not locally available), not proof that a record does not exist. Authentication and other failures remain errors. Only the receipt’s TXID is compared with the requested ID.

The chain is unknown here: reveal decoding, TXID/witness recomputation, inclusion and URMA verification belong to independent admission through Engine::admit_record. Deserialization does not establish those claims.

Source

pub fn object_status(&self, root: Txid) -> Result<Option<ObjectStatus>, Error>

Read object availability reported by the configured local operator. These are operator data, not independently verified chain evidence. Selected member count is independent of local retention: either count may exceed the other, but both must be within a nonzero member total. None means only that no completed object is recorded locally (HTTP 404), not global absence. Root/count sanity checks establish no crypto claims.

Source

pub fn set_pin(&self, root: Txid, pin: bool) -> Result<PinReceipt, Error>

Request a local pin or unpin and read the operator’s acknowledgement at its commit point. This is not cryptographic evidence or a promise of future availability, chain selection or pin state. Only HTTP 200 with the requested root and pin value succeeds. No automatic retry occurs: the operation may already have committed before a socket failure.

Source

pub fn prune_cache(&self) -> Result<PruneReceipt, Error>

Request explicit local cache pruning and read the operator’s removal count. This acknowledgement is not cryptographic evidence or a promise of future cache contents. Only HTTP 200 succeeds. No automatic retry occurs, including when a socket failure leaves the commit outcome unknown.

Source

pub fn overlay_omissions(&self) -> Result<Vec<Omission>, Error>

Recorded peer omissions; HTTP 404 is Error::Invalid("overlay disabled").

Source

pub fn overlay_book(&self) -> Result<Vec<BookEntry>, Error>

The peer book’s routing hints; HTTP 404 is Error::Invalid("overlay disabled").

Source

pub fn wire_page( &self, cursor: Option<&WireCursor>, limit: u32, ) -> Result<WirePage, Error>

Read one bounded page of Wire records from the configured local operator. Entry parsing checks data consistency, not authorship or chain inclusion. Selected records and scanned coverage remain separate; next == None ends only the local result set and does not establish chain completeness. A snapshot is opaque. HTTP 409 returns Error::Busy: discard the partial traversal and explicitly restart. No paging, retry or readback is automatic.

Source

pub fn register_names( &self, genesis: Txid, block: ChainPoint, ) -> Result<NamesStatus, Error>

Register an explicitly located genesis with the local operator. This is a local index acknowledgement, not independent evidence or permanent state. HTTP 409 remains Busy; a possibly committed operation is never retried.

Source

pub fn names_step(&self, genesis: Txid) -> Result<NamesStep, Error>

Request one local Names step and read operator outcomes. No independent proof, automatic stepping, retry or readback; HTTP 409 remains Busy.

Source

pub fn names_status(&self, genesis: Txid) -> Result<Option<NamesStatus>, Error>

Read operator Names progress. None means only locally unregistered (404), not global absence. No stepping or retry; HTTP 409 remains Busy.

Source

pub fn names_resolve( &self, genesis: Txid, name: &Name, ) -> Result<NamesResolution, Error>

Read local operator resolution for a canonical name, not independent ownership evidence or permanent state. No stepping/retry; 409 remains Busy.

Source

pub fn names_view( &self, genesis: Txid, cursor: Option<&NamesCursor>, limit: u32, ) -> Result<NamesPage, Error>

Read one local operator Names page, not independent chain/registry evidence. The consumer checks its expected chain and metadata consistency across pages. No automatic paging, stepping or retry; 409 remains Busy and ends traversal. Absent continuation ends only the local snapshot, not chain completeness.

Trait Implementations§

Source§

impl RecordSource for Client

Fetch data only from the explicitly configured local operator endpoint. This adapter performs no peer or network discovery. The receiving engine independently verifies the package against its own selected headers.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more