pub struct AlnpStream<T: FrameTransport> { /* private fields */ }Expand description
Stream state machine used by higher-level clients.
Implementations§
Source§impl<T: FrameTransport> AlnpStream<T>
impl<T: FrameTransport> AlnpStream<T>
Sourcepub fn new(
session: AlnpSession,
transport: T,
profile: CompiledStreamProfile,
) -> Self
pub fn new( session: AlnpSession, transport: T, profile: CompiledStreamProfile, ) -> Self
Builds a new streaming helper bound to a compiled profile.
Sourcepub fn send(
&self,
channel_format: ChannelFormat,
channels: Vec<u16>,
priority: u8,
groups: Option<HashMap<String, Vec<u16>>>,
metadata: Option<HashMap<String, Value>>,
) -> Result<(), StreamError>
pub fn send( &self, channel_format: ChannelFormat, channels: Vec<u16>, priority: u8, groups: Option<HashMap<String, Vec<u16>>>, metadata: Option<HashMap<String, Value>>, ) -> Result<(), StreamError>
Sends a streaming frame built from raw channel data.
§Guarantees
- Only sends when the session is already authenticated and streaming-enabled.
- Applies jitter strategy derived from the compiled profile; no branching on user-facing preferences happens at this layer.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for AlnpStream<T>
impl<T> !RefUnwindSafe for AlnpStream<T>
impl<T> Send for AlnpStream<T>
impl<T> Sync for AlnpStream<T>
impl<T> Unpin for AlnpStream<T>where
T: Unpin,
impl<T> UnwindSafe for AlnpStream<T>where
T: UnwindSafe,
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