pub enum RequestPayload {
Show 14 variants
CreateSession {
name: Option<String>,
},
DestroySession {
session_id: String,
},
ListSessions,
ListNodes,
AddNode {
session_id: String,
node_id: String,
kind: String,
params: Option<Value>,
},
RemoveNode {
session_id: String,
node_id: String,
},
Connect {
session_id: String,
from_node: String,
from_pin: String,
to_node: String,
to_pin: String,
mode: ConnectionMode,
},
Disconnect {
session_id: String,
from_node: String,
from_pin: String,
to_node: String,
to_pin: String,
},
TuneNode {
session_id: String,
node_id: String,
message: NodeControlMessage,
},
TuneNodeAsync {
session_id: String,
node_id: String,
message: NodeControlMessage,
},
GetPipeline {
session_id: String,
},
ValidateBatch {
session_id: String,
operations: Vec<BatchOperation>,
},
ApplyBatch {
session_id: String,
operations: Vec<BatchOperation>,
},
GetPermissions,
}Expand description
Client-to-server request payload types.
All requests should include a correlation_id in the outer Message wrapper to match responses.
§Session Management
CreateSession: Create a new dynamic pipeline sessionDestroySession: Destroy an existing sessionListSessions: List all sessions visible to the current role
§Pipeline Manipulation
AddNode: Add a node to a session’s pipelineRemoveNode: Remove a node from a session’s pipelineConnect: Connect two nodes in a session’s pipelineDisconnect: Disconnect two nodes in a session’s pipelineTuneNode: Send control message to a node (with response)TuneNodeAsync: Send control message to a node (fire-and-forget)
§Batch Operations
ValidateBatch: Validate multiple operations without applyingApplyBatch: Apply multiple operations atomically
§Discovery
ListNodes: List all available node typesGetPipeline: Get current pipeline state for a sessionGetPermissions: Get current user’s permissions
Variants§
CreateSession
Create a new dynamic pipeline session
DestroySession
Destroy an existing session and clean up resources
ListSessions
List all sessions visible to the current user/role
ListNodes
List all available node types and their schemas
AddNode
Add a node to a session’s pipeline
Fields
RemoveNode
Remove a node from a session’s pipeline
Connect
Connect two nodes in a session’s pipeline
Fields
mode: ConnectionModeConnection mode (reliable or best-effort). Defaults to Reliable.
Disconnect
Disconnect two nodes in a session’s pipeline
Fields
TuneNode
Send a control message to a node and wait for response
Fields
message: NodeControlMessageThe control message (UpdateParams, Start, or Shutdown)
TuneNodeAsync
Fire-and-forget version of TuneNode for frequent updates. No response is sent, making it suitable for high-frequency parameter updates.
Fields
message: NodeControlMessageThe control message (typically UpdateParams)
GetPipeline
Get the current pipeline state for a session
ValidateBatch
Validate a batch of operations without applying them. Returns validation errors if any operations would fail.
Fields
operations: Vec<BatchOperation>List of operations to validate
ApplyBatch
Apply a batch of operations atomically. All operations succeed or all fail together.
Fields
operations: Vec<BatchOperation>List of operations to apply atomically
GetPermissions
Get current user’s permissions based on their role
Trait Implementations§
Source§impl Debug for RequestPayload
impl Debug for RequestPayload
Source§impl<'de> Deserialize<'de> for RequestPayload
impl<'de> Deserialize<'de> for RequestPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for RequestPayload
impl Serialize for RequestPayload
Source§impl TS for RequestPayload
impl TS for RequestPayload
Source§type WithoutGenerics = RequestPayload
type WithoutGenerics = RequestPayload
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or ().
The only requirement for these dummy types is that EXPORT_TO must be None. Read moreSource§type OptionInnerType = RequestPayload
type OptionInnerType = RequestPayload
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete() -> String
fn decl_concrete() -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl() -> String
fn decl() -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline() -> String
fn inline() -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened() -> String
fn inline_flattened() -> String
This function will panic if the type cannot be flattened.
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported.The returned path does not include the base directory from
TS_RS_EXPORT_DIR. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies() -> Vec<Dependency>where
Self: 'static,
fn dependencies() -> Vec<Dependency>where
Self: 'static,
Source§fn export() -> Result<(), ExportError>where
Self: 'static,
fn export() -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all() -> Result<(), ExportError>where
Self: 'static,
fn export_all() -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read moreSource§fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read more