IntoBroadcast

Trait IntoBroadcast 

Source
pub trait IntoBroadcast: Sized + DataSource {
    // Required method
    fn into_broadcast(
        self,
    ) -> Result<BroadcastWrapper<Self>, (Self::Error, Self)>;
}
Expand description

Extension trait for converting any DataSource into a BroadcastWrapper to facilitate broadcasting readings.

Required Methods§

Source

fn into_broadcast(self) -> Result<BroadcastWrapper<Self>, (Self::Error, Self)>

Converts the data source into a BroadcastWrapper.

This internally calls DataSource::read(); if that call fails, the error is propagated and the data source object is returned.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§