Skip to main content

ProviderSession

Struct ProviderSession 

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

An initialized secretspec.provider/1 client together with the child process that owns its private transport.

Implementations§

Source§

impl ProviderSession

Source

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

Launch and validate a provider endpoint. The returned session owns both process and transport.

Source

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

As Self::launch, allowing the endpoint to request only the provider credentials it actually needs during initialization or a provider operation, including provider.set (0.21+). The responder supplies the value through IPC; it does not require a terminal and may use a GUI, credential store, or another caller-owned input mechanism.

Source

pub fn raw(&self) -> &Client

Source

pub async fn execute<M>( &self, params: &M::Params, deadline_unix_ms: u64, ) -> Result<M::Result>
where M: Method,

Source

pub async fn call<P: Serialize, R: DeserializeOwned>( &self, method: &str, params: &P, deadline_unix_ms: u64, ) -> Result<R>

Source

pub async fn resolve_address( &self, params: &<ResolveAddress as Method>::Params, deadline_unix_ms: u64, ) -> Result<<ResolveAddress as Method>::Result>

Source

pub async fn get( &self, params: &<Get as Method>::Params, deadline_unix_ms: u64, ) -> Result<<Get as Method>::Result>

Source

pub async fn get_many( &self, params: &<GetMany as Method>::Params, deadline_unix_ms: u64, ) -> Result<<GetMany as Method>::Result>

Source

pub async fn exists( &self, params: &<Exists as Method>::Params, deadline_unix_ms: u64, ) -> Result<<Exists as Method>::Result>

Source

pub async fn set( &self, params: &<Set as Method>::Params, deadline_unix_ms: u64, ) -> Result<<Set as Method>::Result>

Source

pub async fn set_expiring( &self, params: &<SetExpiring as Method>::Params, deadline_unix_ms: u64, ) -> Result<<SetExpiring as Method>::Result>

Source

pub async fn delete( &self, params: &<Delete as Method>::Params, deadline_unix_ms: u64, ) -> Result<<Delete as Method>::Result>

Source

pub async fn clear( &self, params: &<Clear as Method>::Params, deadline_unix_ms: u64, ) -> Result<<Clear as Method>::Result>

Source

pub async fn describe_write_target( &self, params: &<DescribeWriteTarget as Method>::Params, deadline_unix_ms: u64, ) -> Result<<DescribeWriteTarget as Method>::Result>

Source

pub async fn reflect( &self, params: &<Reflect as Method>::Params, deadline_unix_ms: u64, ) -> Result<<Reflect as Method>::Result>

Source

pub async fn check_writable( &self, params: &AddressParams, deadline_unix_ms: u64, ) -> Result<()>

Source

pub async fn check_deletable( &self, params: &AddressParams, deadline_unix_ms: u64, ) -> Result<()>

Source

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

Source

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

Source

pub fn metadata(&self) -> &Metadata

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.