RequestPayload

Enum RequestPayload 

Source
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 session
  • DestroySession: Destroy an existing session
  • ListSessions: List all sessions visible to the current role

§Pipeline Manipulation

  • AddNode: Add a node to a session’s pipeline
  • RemoveNode: Remove a node from a session’s pipeline
  • Connect: Connect two nodes in a session’s pipeline
  • Disconnect: Disconnect two nodes in a session’s pipeline
  • TuneNode: 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 applying
  • ApplyBatch: Apply multiple operations atomically

§Discovery

  • ListNodes: List all available node types
  • GetPipeline: Get current pipeline state for a session
  • GetPermissions: Get current user’s permissions

Variants§

§

CreateSession

Create a new dynamic pipeline session

Fields

§name: Option<String>

Optional session name for identification

§

DestroySession

Destroy an existing session and clean up resources

Fields

§session_id: String

The session ID to destroy

§

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

§session_id: String

The session ID to add the node to

§node_id: String

Unique identifier for this node instance

§kind: String

Node type (e.g., “audio::gain”, “plugin::native::whisper”)

§params: Option<Value>

Optional JSON configuration parameters for the node

§

RemoveNode

Remove a node from a session’s pipeline

Fields

§session_id: String

The session ID containing the node

§node_id: String

The node ID to remove

§

Connect

Connect two nodes in a session’s pipeline

Fields

§session_id: String

The session ID containing the nodes

§from_node: String

Source node ID

§from_pin: String

Source output pin name

§to_node: String

Destination node ID

§to_pin: String

Destination input pin name

§mode: ConnectionMode

Connection mode (reliable or best-effort). Defaults to Reliable.

§

Disconnect

Disconnect two nodes in a session’s pipeline

Fields

§session_id: String

The session ID containing the nodes

§from_node: String

Source node ID

§from_pin: String

Source output pin name

§to_node: String

Destination node ID

§to_pin: String

Destination input pin name

§

TuneNode

Send a control message to a node and wait for response

Fields

§session_id: String

The session ID containing the node

§node_id: String

The node ID to send the message to

§message: NodeControlMessage

The 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

§session_id: String

The session ID containing the node

§node_id: String

The node ID to send the message to

§message: NodeControlMessage

The control message (typically UpdateParams)

§

GetPipeline

Get the current pipeline state for a session

Fields

§session_id: String

The session ID to query

§

ValidateBatch

Validate a batch of operations without applying them. Returns validation errors if any operations would fail.

Fields

§session_id: String

The session ID to validate operations against

§operations: Vec<BatchOperation>

List of operations to validate

§

ApplyBatch

Apply a batch of operations atomically. All operations succeed or all fail together.

Fields

§session_id: String

The session ID to apply operations to

§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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RequestPayload

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for RequestPayload

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TS for RequestPayload

Source§

type WithoutGenerics = RequestPayload

If this type does not have generic parameters, then 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 more
Source§

type OptionInnerType = RequestPayload

If the implementing type is 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 ident() -> String

Identifier of this type, excluding generic parameters.
Source§

fn docs() -> Option<String>

JSDoc comment to describe this type in TypeScript - when TS is derived, docs are automatically read from your doc comments or #[doc = ".."] attributes
Source§

fn name() -> String

Name of this type in TypeScript, including generic parameters
Source§

fn decl_concrete() -> String

Declaration of this type using the supplied generic arguments. The resulting TypeScript definition will not be generic. For that, see TS::decl(). If this type is not generic, then this function is equivalent to TS::decl().
Source§

fn decl() -> String

Declaration of this type, e.g. type User = { user_id: number, ... }. This function will panic if the type has no declaration. Read more
Source§

fn inline() -> String

Formats this types definition in TypeScript, e.g { user_id: number }. This function will panic if the type cannot be inlined.
Source§

fn inline_flattened() -> String

Flatten a type declaration.
This function will panic if the type cannot be flattened.
Source§

fn visit_generics(v: &mut impl TypeVisitor)
where Self: 'static,

Iterates over all type parameters of this type.
Source§

fn output_path() -> Option<PathBuf>

Returns the output path to where T should be exported.
The returned path does not include the base directory from TS_RS_EXPORT_DIR. Read more
Source§

fn visit_dependencies(v: &mut impl TypeVisitor)
where Self: 'static,

Iterates over all dependency of this type.
Source§

fn dependencies() -> Vec<Dependency>
where Self: 'static,

Resolves all dependencies of this type recursively.
Source§

fn export() -> Result<(), ExportError>
where Self: 'static,

Manually export this type to the filesystem. To export this type together with all of its dependencies, use TS::export_all. Read more
Source§

fn export_all() -> Result<(), ExportError>
where Self: 'static,

Manually export this type to the filesystem, together with all of its dependencies.
To export only this type, without its dependencies, use TS::export. Read more
Source§

fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>
where Self: 'static,

Manually export this type into the given directory, together with all of its dependencies.
To export only this type, without its dependencies, use TS::export. Read more
Source§

fn export_to_string() -> Result<String, ExportError>
where Self: 'static,

Manually generate bindings for this type, returning a String.
This function does not format the output, even if the format feature is enabled. Read more
Source§

fn default_output_path() -> Option<PathBuf>

Returns the output path to where T should be exported. 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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,