clasp-core
Core types and encoding for the CLASP (Creative Low-Latency Application Streaming Protocol).
Features
- Message Types: Set, Get, Subscribe, Unsubscribe, Batch operations
- Value Types: Int, Float, Bool, String, Bytes, Array, Map, Null
- Encoding: MessagePack (binary) and JSON serialization
- Address Patterns: Hierarchical addressing with wildcards (
*,**) - no_std Support: Optional
allocandstdfeatures
Usage
use ;
// Create a set message
let msg = Set;
// Encode to MessagePack
let encoded = encode.unwrap;
// Decode from MessagePack
let decoded: Message = decode.unwrap;
Address Patterns
CLASP uses hierarchical addresses with wildcard support:
| Pattern | Matches |
|---|---|
/lights/front |
Exact match |
/lights/* |
Single segment wildcard |
/lights/** |
Multi-segment wildcard |
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.