Skip to main content

ControlConnection

Struct ControlConnection 

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

Shared discovery result and operation adapter. Standalone JSON connections rediscover before fresh exchanges unless a verified runtime owner is supplied.

Implementations§

Source§

impl ControlConnection

Source

pub async fn connect(path: impl AsRef<Path>) -> ControlClientResult<Self>

Discover support at an existing native endpoint. Path identity alone is not sufficient to reuse JSON format evidence across process replacement.

Source

pub async fn connect_with( path: impl AsRef<Path>, configure: impl FnOnce(ConnectOptions) -> ConnectOptions, ) -> ControlClientResult<Self>

Configure one total deadline covering discovery, redial, and handshake.

Source

pub async fn connect_connector( connector: Arc<dyn Connector>, ) -> ControlClientResult<Self>

Discover using a repeatable, owned connector without claimed OS identity.

Source

pub async fn connect_connector_with( connector: Arc<dyn Connector>, configure: impl FnOnce(ConnectOptions) -> ConnectOptions, ) -> ControlClientResult<Self>

Configure discovery over caller-provided independent transports.

Source

pub async fn connect_verified_connector( connector: Arc<dyn VerifiedControlConnector>, ) -> ControlClientResult<Self>

Reuse JSON discovery while an external runtime owner verifies every peer and rechecks its active run and process birth before each operation.

Source

pub async fn connect_verified_connector_with( connector: Arc<dyn VerifiedControlConnector>, configure: impl FnOnce(ConnectOptions) -> ConnectOptions, ) -> ControlClientResult<Self>

Configure setup for an identity-verifying backend connector.

Source

pub fn mode(&self) -> ControlMode

Format selected by this setup. A later detected format change invalidates the JSON handle before sending; callers explicitly establish a new one.

Source

pub fn capabilities(&self) -> &Capabilities

Capability snapshot validated during discovery. Reading it performs no I/O; use GetCapabilities to explicitly request a fresh observation.

Source

pub fn is_closed(&self) -> bool

Inspect shared closure without dialing or rediscovery.

Source

pub async fn closed(&self)

Wait for the selected connection to close without dialing or polling.

Source

pub fn framed(&self) -> ControlClientResult<&ControlClient>

Obtain the complete generic framed surface. JSON fails locally, without opening an endpoint or manufacturing an equivalent frame.

Source

pub async fn close(&self)

Close all shared handles. Subsequent requests cannot silently reconnect.

Source

pub async fn request( &self, message: impl IntoControlMessage, ) -> ControlClientResult<ControlReply>

Send a named request and retain its actual reply representation.

Source

pub async fn request_with( &self, message: impl IntoControlMessage, configure: impl FnOnce(RequestOptions) -> RequestOptions, ) -> ControlClientResult<ControlReply>

Configure one attempt, including any identity recheck or JSON rediscovery.

Source

pub async fn request_typed<R: CheckedControlRequest>( &self, request: &R, ) -> ControlClientResult<R::Response>

Normalize a checked request using the selected format’s real decoder.

Source

pub async fn request_typed_with<R: CheckedControlRequest>( &self, request: &R, configure: impl FnOnce(RequestOptions) -> RequestOptions, ) -> ControlClientResult<R::Response>

Configure one checked operation’s local wait.

Trait Implementations§

Source§

impl Clone for ControlConnection

Source§

fn clone(&self) -> ControlConnection

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.