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.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CustomStreamDef
impl RefUnwindSafe for CustomStreamDef
impl !Send for CustomStreamDef
impl !Sync for CustomStreamDef
impl Unpin for CustomStreamDef
impl UnwindSafe for CustomStreamDef
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