Skip to main content

TuiHandler

Trait TuiHandler 

Source
pub trait TuiHandler {
Show 19 methods // Required methods fn handle_connect<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 ConnectRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_disconnect<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_create_window<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_close_window<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_list_windows<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_focus_window<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_split_pane<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 SplitRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_close_pane<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_focus_pane<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_snapshot<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_resize<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 ResizeRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_send_input<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 SendInputRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_spawn_shell<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 SpawnShellRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_poll_stdin<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_spawn_chrome_shell<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 SpawnChromeShellRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_spawn_chat_app<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 SpawnChatAppRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_create_private_pane<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 CreatePrivatePaneRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; // Provided methods fn authorize<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, resource: &'life2 str, operation: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn is_resource_authorized<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, resource: &'life2 str, operation: &'life3 str, ) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... }
}
Expand description

Generated handler trait for the Tui service.

Required Methods§

Source

fn handle_connect<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 ConnectRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle connect request.

Source

fn handle_disconnect<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle disconnect request.

Source

fn handle_create_window<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle createWindow request.

Source

fn handle_close_window<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle closeWindow request.

Source

fn handle_list_windows<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle listWindows request.

Source

fn handle_focus_window<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle focusWindow request.

Source

fn handle_split_pane<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 SplitRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle splitPane request.

Source

fn handle_close_pane<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle closePane request.

Source

fn handle_focus_pane<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle focusPane request.

Source

fn handle_snapshot<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle snapshot request.

Source

fn handle_resize<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 ResizeRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle resize request.

Source

fn handle_send_input<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 SendInputRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle sendInput request.

Source

fn handle_spawn_shell<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 SpawnShellRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle spawnShell request.

Source

fn handle_poll_stdin<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: u32, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle pollStdin request.

Source

fn handle_spawn_chrome_shell<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 SpawnChromeShellRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle spawnChromeShell request.

Source

fn handle_spawn_chat_app<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 SpawnChatAppRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle spawnChatApp request.

Source

fn handle_create_private_pane<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 CreatePrivatePaneRequest, ) -> Pin<Box<dyn Future<Output = Result<TuiResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle createPrivatePane request.

Provided Methods§

Source

fn authorize<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, resource: &'life2 str, operation: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Authorize an operation on a resource. Override to enforce policy.

Called by generated dispatch functions before handler methods. Every method carries a mandatory $scope/$capability annotation (S3, #547) except explicit $scopeExempt methods, which are not gated here. Default: deny all. Services MUST override to enable access.

Source

fn is_resource_authorized<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, resource: &'life2 str, operation: &'life3 str, ) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Check if a specific resource+operation is authorized (non-failing).

Useful for filtering list results per-resource. Default delegates to authorize().is_ok().

Implementors§