Skip to main content

ResolverSession

Struct ResolverSession 

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

An initialized resolver session over a private authenticated stream (0.21+).

A launched session also owns its transport child. A connected session owns only the stream; closing it releases this session, not the hosting service. Reconnecting creates a fresh session and never replays an interrupted call.

Implementations§

Source§

impl ResolverSession

Source

pub async fn launch( options: LaunchOptions, client: Product, limits: Limits, application: ResolverInitializeApplication, startup_deadline_unix_ms: u64, ) -> Result<Self>

Source

pub async fn launch_with_prompt( options: LaunchOptions, client: Product, limits: Limits, application: ResolverInitializeApplication, startup_deadline_unix_ms: u64, responder: Option<Arc<dyn PromptResponder>>, ) -> Result<Self>

As Self::launch, letting the resolver ask this process for a value a prompt = true declaration has no stored value for (0.21+).

Source

pub async fn connect<R, W>( reader: R, writer: W, client: Product, limits: Limits, application: ResolverInitializeApplication, filesystem: FilesystemAccess, startup_deadline_unix_ms: u64, ) -> Result<Self>
where R: AsyncRead + Unpin + Send + 'static, W: AsyncWrite + Unpin + Send + 'static,

Connect an already authenticated and authorized stream (0.21+).

The caller must authenticate the endpoint and protect both directions before calling this method. The server must authorize initialization against the authenticated principal. Manifest paths and inline base_dir always name locations on the resolver machine.

Source

pub async fn connect_with_prompt<R, W>( reader: R, writer: W, client: Product, limits: Limits, application: ResolverInitializeApplication, filesystem: FilesystemAccess, startup_deadline_unix_ms: u64, responder: Option<Arc<dyn PromptResponder>>, ) -> Result<Self>
where R: AsyncRead + Unpin + Send + 'static, W: AsyncWrite + Unpin + Send + 'static,

As Self::connect, supporting prompts on the calling device (0.21+).

Source

pub async fn launch_ssh( options: SshOptions, client: Product, limits: Limits, application: ResolverInitializeApplication, startup_deadline_unix_ms: u64, ) -> Result<Self>

Launch a resolver over SSH with preconfigured authentication (0.21+). Calling this again starts a fresh session; it never resumes old requests.

Source

pub async fn launch_ssh_with_prompt( options: SshOptions, client: Product, limits: Limits, application: ResolverInitializeApplication, startup_deadline_unix_ms: u64, responder: Option<Arc<dyn PromptResponder>>, ) -> Result<Self>

As Self::launch_ssh, supporting resolver prompts locally (0.21+).

Source

pub fn raw(&self) -> &Client

Raw protocol access. The caller must enforce filesystem policy itself; prefer the typed methods, which reject remote path resolution (0.21+).

Source

pub async fn get( &self, params: &GetParams, deadline_unix_ms: u64, ) -> Result<GetResult>

Source

pub async fn release( &self, params: &ReleaseParams, deadline_unix_ms: u64, ) -> Result<ReleaseResult>

Source

pub async fn set( &self, params: &SetParams, deadline_unix_ms: u64, ) -> Result<SetResult>

Store one declared name (0.21+). Only endpoints that advertise resolver.set accept it, so check Self::supports first when the caller can explain a read-only endpoint better than the wire error does.

Source

pub async fn delete( &self, params: &DeleteParams, deadline_unix_ms: u64, ) -> Result<DeleteResult>

Remove one declared name’s stored value (0.21+), advertised as resolver.delete under the same rule as Self::set.

Source

pub fn capabilities(&self) -> &HashSet<String>

Source

pub fn supports(&self, method: &str) -> bool

Whether the endpoint advertised one method, such as resolver_protocol::method::SET.

Source

pub fn initialized(&self) -> &ResolverInitializedApplication

Source

pub fn is_closed(&self) -> bool

Source

pub async fn close(&self, deadline_unix_ms: u64) -> Result<()>

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> 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, 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.