pub trait AllocateStreamId: Debug {
// Required method
fn next(&mut self) -> Result<StreamId, ProtocolError>;
}Expand description
Fallible stream ID allocation behavior.
Required Methods§
Sourcefn next(&mut self) -> Result<StreamId, ProtocolError>
fn next(&mut self) -> Result<StreamId, ProtocolError>
Allocate the next stream ID and advance the allocator.
§Errors
Returns ProtocolError::CodecError when this allocator has exhausted
the u32 stream ID space for its parity.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".