pub struct StreamCapability {
pub supported_data_types: Vec<StreamDataType>,
pub max_chunk_size: usize,
pub preferred_chunk_size: usize,
pub max_concurrent_sessions: usize,
pub mode: StreamMode,
pub direction: StreamDirection,
pub flow_control: FlowControl,
pub config_schema: Option<Value>,
}Expand description
Stream capability descriptor.
Fields§
§supported_data_types: Vec<StreamDataType>§max_chunk_size: usize§preferred_chunk_size: usize§max_concurrent_sessions: usize§mode: StreamMode§direction: StreamDirection§flow_control: FlowControl§config_schema: Option<Value>Optional JSON schema for stream configuration
Implementations§
Source§impl StreamCapability
impl StreamCapability
Sourcepub fn with_data_type(self, data_type: StreamDataType) -> Self
pub fn with_data_type(self, data_type: StreamDataType) -> Self
Add a supported data type.
Sourcepub fn with_chunk_size(self, preferred: usize, max: usize) -> Self
pub fn with_chunk_size(self, preferred: usize, max: usize) -> Self
Set chunk size constraints.
Trait Implementations§
Source§impl Clone for StreamCapability
impl Clone for StreamCapability
Source§fn clone(&self) -> StreamCapability
fn clone(&self) -> StreamCapability
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamCapability
impl Debug for StreamCapability
Source§impl Default for StreamCapability
impl Default for StreamCapability
Source§fn default() -> StreamCapability
fn default() -> StreamCapability
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StreamCapability
impl<'de> Deserialize<'de> for StreamCapability
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StreamCapability
impl RefUnwindSafe for StreamCapability
impl Send for StreamCapability
impl Sync for StreamCapability
impl Unpin for StreamCapability
impl UnsafeUnpin for StreamCapability
impl UnwindSafe for StreamCapability
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