Trait proxy_sdk::StreamDataControl
source · pub trait StreamDataControl {
const TYPE: StreamType;
// Required methods
fn data_size(&self) -> usize;
fn end_of_stream(&self) -> bool;
// Provided methods
fn all(&self) -> Option<Vec<u8>> { ... }
fn get(&self, range: impl RangeBounds<usize>) -> Option<Vec<u8>> { ... }
fn set(&self, range: impl RangeBounds<usize>, value: &[u8]) { ... }
fn replace(&self, value: &[u8]) { ... }
fn clear(&self) { ... }
}
Expand description
Defines functions to interact with stream data
Required Associated Constants§
sourceconst TYPE: StreamType
const TYPE: StreamType
Upstream or Downstream
Required Methods§
sourcefn end_of_stream(&self) -> bool
fn end_of_stream(&self) -> bool
If true, this will be the last downstream data for this context.
Provided Methods§
sourcefn set(&self, range: impl RangeBounds<usize>, value: &[u8])
fn set(&self, range: impl RangeBounds<usize>, value: &[u8])
Replace a range of data with value
.
Object Safety§
This trait is not object safe.