pub struct HostedClient {
pub remote: Remote<IrohTransport<Credentials>>,
/* private fields */
}Expand description
A direct Weft connection. The application retains operation IDs, credentials, observed versions and stream checkpoints; reconnect never retries a mutation.
Fields§
§remote: Remote<IrohTransport<Credentials>>Implementations§
Source§impl HostedClient
impl HostedClient
Sourcepub async fn connect_server(
server: &str,
options: &ConnectionOptions,
) -> Result<Self>
pub async fn connect_server( server: &str, options: &ConnectionOptions, ) -> Result<Self>
Verify the application’s HTTPS descriptor trust, connect once, and discover the endpoint’s actual v2 implementation inventory.
Sourcepub async fn connect_endpoint(
address: EndpointAddr,
credential: Credentials,
timeout: Duration,
tls_ca_certificate_pem: Option<&str>,
) -> Result<Self>
pub async fn connect_endpoint( address: EndpointAddr, credential: Credentials, timeout: Duration, tls_ca_certificate_pem: Option<&str>, ) -> Result<Self>
Connect to an endpoint whose public key the application already trusts. Relay addresses are routing hints; Iroh authenticates the supplied key.
pub fn local_endpoint_id(&self) -> EndpointId
pub fn endpoint(&self) -> &Endpoint
pub fn connection(&self) -> &Connection
Sourcepub fn into_parts(
self,
) -> (Remote<IrohTransport<Credentials>>, Endpoint, Connection)
pub fn into_parts( self, ) -> (Remote<IrohTransport<Credentials>>, Endpoint, Connection)
Release the discovered remote and the live Iroh session without closing.
The caller becomes responsible for closing connection / endpoint.
Trait Implementations§
Source§impl Drop for HostedClient
impl Drop for HostedClient
Auto Trait Implementations§
impl !RefUnwindSafe for HostedClient
impl !UnwindSafe for HostedClient
impl Freeze for HostedClient
impl Send for HostedClient
impl Sync for HostedClient
impl Unpin for HostedClient
impl UnsafeUnpin for HostedClient
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
Mutably borrows from an owned value. Read more
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> ⓘ
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 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> ⓘ
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