pub struct StreamAsset { /* private fields */ }
Implementations§
Source§impl StreamAsset
impl StreamAsset
pub fn new(reciever: Receiver<WebSocketMessage>, asset: String) -> StreamAsset
pub async fn recieve(&self) -> Result<DataCandle, PocketOptionError>
pub fn to_stream( &self, ) -> impl Stream<Item = Result<DataCandle, PocketOptionError>>
pub fn to_stream_static( self: Arc<StreamAsset>, ) -> impl Stream<Item = Result<DataCandle, PocketOptionError>> + 'static
Trait Implementations§
Source§impl Clone for StreamAsset
impl Clone for StreamAsset
Source§fn clone(&self) -> StreamAsset
fn clone(&self) -> StreamAsset
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for StreamAsset
impl RefUnwindSafe for StreamAsset
impl Send for StreamAsset
impl Sync for StreamAsset
impl !Unpin for StreamAsset
impl UnwindSafe for StreamAsset
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