pub struct Remote<T: RpcTransport<Error = Error>> {
pub api: Client<T>,
pub description: DescribeEndpointResponse,
}Expand description
One authenticated source. A combined Thread retains one source per endpoint; a hosted action is sent directly to the Weft source, never via a device.
Fields§
§api: Client<T>§description: DescribeEndpointResponseImplementations§
Source§impl<T: RpcTransport<Error = Error>> Remote<T>
impl<T: RpcTransport<Error = Error>> Remote<T>
Sourcepub async fn read_blobs(
&self,
thread: ThreadRef,
revision: RevisionRef,
sources: Vec<BlobSource>,
) -> Result<Vec<Blob>, Error>
pub async fn read_blobs( &self, thread: ThreadRef, revision: RevisionRef, sources: Vec<BlobSource>, ) -> Result<Vec<Blob>, Error>
One request for any mixture of paths and missing object hashes. The The selected Thread and revision pin content and authorization without a mutable Thread-tip lookup.
Source§impl<T: RpcTransport<Error = Error>> Remote<T>
impl<T: RpcTransport<Error = Error>> Remote<T>
Sourcepub async fn start_thread(
&self,
creation: &ThreadCreation,
) -> Result<ThreadMutationResponse, ClientError<Error>>
pub async fn start_thread( &self, creation: &ThreadCreation, ) -> Result<ThreadMutationResponse, ClientError<Error>>
One command returns its receipt and resulting overview. Bind subsequent
calls with remote.thread(creation.reference().clone()), without lookup.
Source§impl<T: RpcTransport<Error = Error>> Remote<T>
impl<T: RpcTransport<Error = Error>> Remote<T>
pub async fn begin_provider_fetch( &self, open: FetchOpen, limits: Limits, ) -> Result<ProviderFetch<T::Writer, T::Reader>, Error>
Source§impl<T: RpcTransport<Error = Error>> Remote<T>
impl<T: RpcTransport<Error = Error>> Remote<T>
Source§impl<T: RpcTransport<Error = Error>> Remote<T>
impl<T: RpcTransport<Error = Error>> Remote<T>
Sourcepub async fn publish_content<R: AsyncRead + Unpin + Send>(
&self,
opening: &PublishContentClientFrame,
originals: &PublicationOriginals,
artifacts: [R; 2],
) -> Result<PublicationReceipt, Error>
pub async fn publish_content<R: AsyncRead + Unpin + Send>( &self, opening: &PublishContentClientFrame, originals: &PublicationOriginals, artifacts: [R; 2], ) -> Result<PublicationReceipt, Error>
Publish original source proofs and exact source in one exchange. Inputs are the native pack and its index in opening order; neither is buffered in full. The caller retains the operation ID and opening to retry after an interrupted call. A receipt is returned only after verifying its exact publication scope.
Source§impl<T: RpcTransport<Error = Error>> Remote<T>
impl<T: RpcTransport<Error = Error>> Remote<T>
Sourcepub async fn discover(
transport: T,
endpoint_key: [u8; 32],
kind: EndpointKind,
) -> Result<Self, ClientError<Error>>
pub async fn discover( transport: T, endpoint_key: [u8; 32], kind: EndpointKind, ) -> Result<Self, ClientError<Error>>
The caller supplies the Iroh-authenticated endpoint key and intended kind. Describe is the only bootstrap exception to implemented-method discovery.
Sourcepub async fn observe<M>(
&self,
request: M::Request,
resume: Option<Resume>,
) -> Result<Observation<T::Reader, M::Response>, Error>
pub async fn observe<M>( &self, request: M::Request, resume: Option<Resume>, ) -> Result<Observation<T::Reader, M::Response>, Error>
Observe any contract view as atomic bounded batches. The bookmark binds the exact method and projection as well as the authenticated endpoint.
Sourcepub async fn observe_analysis(
&self,
request: ObserveAnalysisRequest,
resume: Option<Resume>,
) -> Result<AnalysisObservation<T::Reader>, Error>
pub async fn observe_analysis( &self, request: ObserveAnalysisRequest, resume: Option<Resume>, ) -> Result<AnalysisObservation<T::Reader>, Error>
Source-backed analysis uses the same committed view protocol as identity, collaboration, checkouts and Thread observations.
Auto Trait Implementations§
impl<T> Freeze for Remote<T>
impl<T> RefUnwindSafe for Remote<T>where
Client<T>: RefUnwindSafe,
impl<T> Send for Remote<T>
impl<T> Sync for Remote<T>
impl<T> Unpin for Remote<T>
impl<T> UnsafeUnpin for Remote<T>where
Client<T>: UnsafeUnpin,
impl<T> UnwindSafe for Remote<T>where
Client<T>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
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