Struct synthizer::CustomStreamDef
source · pub struct CustomStreamDef { /* private fields */ }
Expand description
A definition for a custom stream. This can come from a variety of places and is consumed by e.g. StreamingGenerator::from_stream_handle, or returned as a result of the callback passed to register_stream_protocol.
Implementations§
source§impl CustomStreamDef
impl CustomStreamDef
sourcepub fn from_reader<T: Stream>(value: T) -> CustomStreamDef
pub fn from_reader<T: Stream>(value: T) -> CustomStreamDef
Convert a Read to a stream.
sourcepub fn from_seekable<T: SeekableStream>(value: T) -> Result<CustomStreamDef>
pub fn from_seekable<T: SeekableStream>(value: T) -> Result<CustomStreamDef>
Build a stream from something seekable.