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
impl ResolverSession
pub async fn launch( options: LaunchOptions, client: Product, limits: Limits, application: ResolverInitializeApplication, startup_deadline_unix_ms: u64, ) -> Result<Self>
Sourcepub 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>
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+).
Sourcepub async fn connect<R, W>(
reader: R,
writer: W,
client: Product,
limits: Limits,
application: ResolverInitializeApplication,
filesystem: FilesystemAccess,
startup_deadline_unix_ms: u64,
) -> Result<Self>
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>
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.
Sourcepub 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>
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>
As Self::connect, supporting prompts on the calling device (0.21+).
Sourcepub async fn launch_ssh(
options: SshOptions,
client: Product,
limits: Limits,
application: ResolverInitializeApplication,
startup_deadline_unix_ms: u64,
) -> Result<Self>
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.
Sourcepub 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>
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+).
Sourcepub fn raw(&self) -> &Client
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+).
pub async fn get( &self, params: &GetParams, deadline_unix_ms: u64, ) -> Result<GetResult>
pub async fn release( &self, params: &ReleaseParams, deadline_unix_ms: u64, ) -> Result<ReleaseResult>
Sourcepub async fn set(
&self,
params: &SetParams,
deadline_unix_ms: u64,
) -> Result<SetResult>
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.
Sourcepub async fn delete(
&self,
params: &DeleteParams,
deadline_unix_ms: u64,
) -> Result<DeleteResult>
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.
pub fn capabilities(&self) -> &HashSet<String>
Sourcepub fn supports(&self, method: &str) -> bool
pub fn supports(&self, method: &str) -> bool
Whether the endpoint advertised one method, such as
resolver_protocol::method::SET.