Skip to main content

Module operation

Module operation 

Source
Expand description

Enhanced operation framework with composability and validation support

This module provides the core framework for UPnP operations with advanced features:

  • Composable operations that can be chained, batched, or made conditional
  • Dual validation strategy (boundary vs comprehensive)
  • Fluent builder pattern for operation construction
  • Strong type safety with minimal boilerplate

Modules§

macros
Declarative macros for UPnP operation and service definitions

Structs§

ComposableOperation
A composable operation ready for execution
OperationBuilder
Builder for constructing UPnP operations with configuration
OperationMetadata
Metadata about a UPnP operation

Enums§

ValidationError
Validation error types
ValidationLevel
Validation levels for operation parameters

Traits§

SonosOperation
Base trait for all Sonos API operations (LEGACY)
UPnPOperation
Enhanced UPnP operation trait with composability support
Validate
Trait for types that can be validated

Functions§

assert_derivable_arg_name
Compile-time guard rejecting request field names whose UPnP element name cannot be derived by capitalizing the first character.
capitalize_first
Capitalize the first character of a snake_case field name.
parse_sonos_bool
Parse a Sonos UPnP boolean argument out of a SOAP response body.
response_field
Read a named response argument and parse it, falling back to the type’s default when the argument is absent or unparseable.
response_string
Read a named response argument as an owned string, defaulting to empty.
response_text
Read the text content of a named argument out of a SOAP response body.
validate_channel
Validate a RenderingControl channel parameter.
xml_escape
Escape XML special characters in a string for safe SOAP payload interpolation.