pub struct Frame { /* private fields */ }Expand description
A complete protocol frame
Implementations§
Source§impl Frame
impl Frame
Sourcepub fn into_payload(self) -> Payload
pub fn into_payload(self) -> Payload
Consume and return the payload
Sourcepub fn decode(data: &[u8]) -> ProtocolResult<Self>
pub fn decode(data: &[u8]) -> ProtocolResult<Self>
Decode frame from wire format
Source§impl Frame
impl Frame
Sourcepub fn search_path(path: &str, pattern: &str, max_results: u8) -> Self
pub fn search_path(path: &str, pattern: &str, max_results: u8) -> Self
Create a SEARCH frame with path, pattern, and max results
Sourcepub fn format_path(mode: &str, path: &str, depth: u8) -> Self
pub fn format_path(mode: &str, path: &str, depth: u8) -> Self
Create a FORMAT frame with mode, path, and depth (scans and formats)
Sourcepub fn remember(content: &str, keywords: &str, memory_type: &str) -> Self
pub fn remember(content: &str, keywords: &str, memory_type: &str) -> Self
Create a REMEMBER frame
Sourcepub fn audio(acoustic_bytes: &[u8]) -> Self
pub fn audio(acoustic_bytes: &[u8]) -> Self
Create an AUDIO frame with AcousticMemory data
Payload format: [AYE8 magic + serialized AcousticMemory bytes] The bytes should be from liquid-rust’s AcousticMemory::to_bytes()
Sourcepub fn audio_simple(text: &str, valence: f32, arousal: f32) -> Self
pub fn audio_simple(text: &str, valence: f32, arousal: f32) -> Self
Create an AUDIO frame with text and emotion (simplified)
For when you don’t have full AcousticMemory, just text + emotion
Trait Implementations§
impl Eq for Frame
impl StructuralPartialEq for Frame
Auto Trait Implementations§
impl Freeze for Frame
impl RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl UnsafeUnpin for Frame
impl UnwindSafe for Frame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more