pub struct TuiClient { /* private fields */ }Expand description
Auto-generated client for the Tui service.
Implementations§
Source§impl TuiClient
impl TuiClient
Sourcepub const SERVICE_NAME: &'static str = "tui"
pub const SERVICE_NAME: &'static str = "tui"
Canonical service/destination domain used for cryptographic RPC binding.
Sourcepub fn from_provider(
provider: &dyn RpcClientProvider,
signing_key: SigningKey,
token: Option<String>,
) -> Result<Self>
pub fn from_provider( provider: &dyn RpcClientProvider, signing_key: SigningKey, token: Option<String>, ) -> Result<Self>
Construct this typed client through an application-supplied
hyprstream_rpc::RpcClientProvider. Resolver authority and
endpoint policy stay outside the portable contract crate.
pub fn with_delegated_bearer(self, token: impl Into<String>) -> Self
Sourcepub fn with_bearer(self, token: impl Into<String>) -> Self
pub fn with_bearer(self, token: impl Into<String>) -> Self
Set this client’s DIRECT bearer for every call.
Unlike Self::with_delegated_bearer, the token travels as the
envelope’s own JWT — the caller is asserting the token as ITS
verified credential, and the receiving service’s holder/cnf
binding applies against this client’s signing key. Used for
caller-authored credentials (e.g. the Model→Inference
iw+jwt internal work order); never for relaying a foreign
holder’s token.
Sourcepub fn request(&self) -> RequestBuilder<'_>
pub fn request(&self) -> RequestBuilder<'_>
Create a per-call request builder for custom authentication options.
The builder is Send+Sync and idempotent — it stores per-call auth context without mutating the shared client. Safe for use with connection pooling.
Sourcepub async fn call(&self, payload: Vec<u8>) -> Result<Vec<u8>>
pub async fn call(&self, payload: Vec<u8>) -> Result<Vec<u8>>
Send a raw request and return the raw response bytes.
Sourcepub async fn call_with_method(
&self,
method_discriminator: u16,
payload: Vec<u8>,
) -> Result<Vec<u8>>
pub async fn call_with_method( &self, method_discriminator: u16, payload: Vec<u8>, ) -> Result<Vec<u8>>
Send a generated request with its canonical schema method id.
Sourcepub async fn call_streaming(
&self,
payload: Vec<u8>,
ephemeral_pubkey: [u8; 32],
) -> Result<Vec<u8>>
pub async fn call_streaming( &self, payload: Vec<u8>, ephemeral_pubkey: [u8; 32], ) -> Result<Vec<u8>>
Send a streaming request with ephemeral DH pubkey.
Sourcepub async fn call_streaming_with_method(
&self,
method_discriminator: u16,
payload: Vec<u8>,
ephemeral_pubkey: [u8; 32],
) -> Result<Vec<u8>>
pub async fn call_streaming_with_method( &self, method_discriminator: u16, payload: Vec<u8>, ephemeral_pubkey: [u8; 32], ) -> Result<Vec<u8>>
Send a generated streaming request with its schema method id.
Sourcepub async fn connect(&self, __request: &ConnectRequest) -> Result<ConnectResult>
pub async fn connect(&self, __request: &ConnectRequest) -> Result<ConnectResult>
Connect viewer to TUI session
Scope: write
Sourcepub async fn disconnect(&self, value: u32) -> Result<()>
pub async fn disconnect(&self, value: u32) -> Result<()>
Disconnect viewer from TUI session
Scope: write
Sourcepub async fn create_window(&self) -> Result<WindowInfo>
pub async fn create_window(&self) -> Result<WindowInfo>
Create a new window
Scope: write
Sourcepub async fn close_window(&self, value: u32) -> Result<()>
pub async fn close_window(&self, value: u32) -> Result<()>
Close a window
Scope: write
Sourcepub async fn list_windows(&self, value: u32) -> Result<WindowList>
pub async fn list_windows(&self, value: u32) -> Result<WindowList>
List all windows in a session
Scope: query
Sourcepub async fn focus_window(&self, value: u32) -> Result<()>
pub async fn focus_window(&self, value: u32) -> Result<()>
Focus a window
Scope: write
Sourcepub async fn split_pane(&self, __request: &SplitRequest) -> Result<PaneInfo>
pub async fn split_pane(&self, __request: &SplitRequest) -> Result<PaneInfo>
Split active pane horizontally or vertically
Scope: write
Sourcepub async fn close_pane(&self, value: u32) -> Result<()>
pub async fn close_pane(&self, value: u32) -> Result<()>
Close a pane
Scope: write
Sourcepub async fn focus_pane(&self, value: u32) -> Result<()>
pub async fn focus_pane(&self, value: u32) -> Result<()>
Focus a pane
Scope: write
Sourcepub async fn snapshot(&self, value: u32) -> Result<TuiSnapshot>
pub async fn snapshot(&self, value: u32) -> Result<TuiSnapshot>
Get snapshot of current display
Scope: query
Sourcepub async fn resize(&self, __request: &ResizeRequest) -> Result<()>
pub async fn resize(&self, __request: &ResizeRequest) -> Result<()>
Resize terminal dimensions
Scope: write
Sourcepub async fn send_input(&self, __request: &SendInputRequest) -> Result<()>
pub async fn send_input(&self, __request: &SendInputRequest) -> Result<()>
Send input to active pane
Scope: write
Sourcepub async fn spawn_shell(
&self,
__request: &SpawnShellRequest,
) -> Result<SpawnShellResult>
pub async fn spawn_shell( &self, __request: &SpawnShellRequest, ) -> Result<SpawnShellResult>
Spawn a shell in a pane
Scope: write
Sourcepub async fn poll_stdin(&self, value: u32) -> Result<Vec<u8>>
pub async fn poll_stdin(&self, value: u32) -> Result<Vec<u8>>
Poll for stdin bytes queued for this viewer
Scope: query
Sourcepub async fn spawn_chrome_shell(
&self,
__request: &SpawnChromeShellRequest,
) -> Result<SpawnShellResult>
pub async fn spawn_chrome_shell( &self, __request: &SpawnChromeShellRequest, ) -> Result<SpawnShellResult>
Spawn ShellApp chrome renderer in a TuiService pane
Scope: write
Sourcepub async fn spawn_chat_app(
&self,
__request: &SpawnChatAppRequest,
) -> Result<SpawnShellResult>
pub async fn spawn_chat_app( &self, __request: &SpawnChatAppRequest, ) -> Result<SpawnShellResult>
Spawn ChatApp inference pane
Scope: write
Sourcepub async fn create_private_pane(
&self,
__request: &CreatePrivatePaneRequest,
) -> Result<u32>
pub async fn create_private_pane( &self, __request: &CreatePrivatePaneRequest, ) -> Result<u32>
Create a private client-owned pane
Scope: write
Sourcepub fn parse_response(bytes: &[u8]) -> Result<TuiResponseVariant>
pub fn parse_response(bytes: &[u8]) -> Result<TuiResponseVariant>
Parse a response from raw bytes.
Source§impl TuiClient
impl TuiClient
Sourcepub fn for_local_bootstrap(
signing_key: SigningKey,
destination: VerifyingKey,
token: Option<String>,
) -> Result<Self>
pub fn for_local_bootstrap( signing_key: SigningKey, destination: VerifyingKey, token: Option<String>, ) -> Result<Self>
Construct a client for a co-located service discovered through the explicitly registered local endpoint.
Sourcepub fn for_local_endpoint_bootstrap(
endpoint: &str,
signing_key: SigningKey,
destination: VerifyingKey,
token: Option<String>,
) -> Result<Self>
pub fn for_local_endpoint_bootstrap( endpoint: &str, signing_key: SigningKey, destination: VerifyingKey, token: Option<String>, ) -> Result<Self>
Construct a client from an explicit local endpoint string.
Sourcepub fn for_local_transport_bootstrap(
transport: &TransportConfig,
signing_key: SigningKey,
destination: VerifyingKey,
token: Option<String>,
) -> Result<Self>
pub fn for_local_transport_bootstrap( transport: &TransportConfig, signing_key: SigningKey, destination: VerifyingKey, token: Option<String>, ) -> Result<Self>
Construct a client from a typed local transport.
Source§impl TuiClient
impl TuiClient
Sourcepub async fn call_method(&self, method: &str, args: &Value) -> Result<Value>
pub async fn call_method(&self, method: &str, args: &Value) -> Result<Value>
Dispatch a method call by name with JSON arguments. Returns the response as a proper JSON value.
Sourcepub async fn call_streaming_method(
&self,
method: &str,
args: &Value,
ephemeral_pubkey: [u8; 32],
) -> Result<StreamInfo>
pub async fn call_streaming_method( &self, method: &str, args: &Value, ephemeral_pubkey: [u8; 32], ) -> Result<StreamInfo>
Dispatch a streaming method call by name with JSON arguments and an ephemeral public key.
Returns the verified-capnp StreamInfo library type (decoded + COSE-verified
inside call_streaming) — NOT a re-serialized serde_json::Value (#468).
Trait Implementations§
Source§impl TuiRpc for TuiClient
impl TuiRpc for TuiClient
fn connect<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ConnectRequest,
) -> Pin<Box<dyn Future<Output = Result<ConnectResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 self,
value: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_window<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WindowInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close_window<'life0, 'async_trait>(
&'life0 self,
value: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_windows<'life0, 'async_trait>(
&'life0 self,
value: u32,
) -> Pin<Box<dyn Future<Output = Result<WindowList>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn focus_window<'life0, 'async_trait>(
&'life0 self,
value: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn split_pane<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 SplitRequest,
) -> Pin<Box<dyn Future<Output = Result<PaneInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn close_pane<'life0, 'async_trait>(
&'life0 self,
value: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn focus_pane<'life0, 'async_trait>(
&'life0 self,
value: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn snapshot<'life0, 'async_trait>(
&'life0 self,
value: u32,
) -> Pin<Box<dyn Future<Output = Result<TuiSnapshot>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn resize<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ResizeRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_input<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 SendInputRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn spawn_shell<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 SpawnShellRequest,
) -> Pin<Box<dyn Future<Output = Result<SpawnShellResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn poll_stdin<'life0, 'async_trait>(
&'life0 self,
value: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn spawn_chrome_shell<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 SpawnChromeShellRequest,
) -> Pin<Box<dyn Future<Output = Result<SpawnShellResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn spawn_chat_app<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 SpawnChatAppRequest,
) -> Pin<Box<dyn Future<Output = Result<SpawnShellResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_private_pane<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 CreatePrivatePaneRequest,
) -> Pin<Box<dyn Future<Output = Result<u32>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for TuiClient
impl !RefUnwindSafe for TuiClient
impl Send for TuiClient
impl Sync for TuiClient
impl Unpin for TuiClient
impl UnsafeUnpin for TuiClient
impl !UnwindSafe for TuiClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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