pub trait SendTmdsScdc: Send {
type Error: DdcError + Send;
// Required methods
fn write_tmds_config(
&mut self,
config: SinkTmdsConfig,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn update_tmds_config(
&mut self,
config: SinkTmdsConfig,
) -> impl Future<Output = Result<(), UpdateError<Self::Error>>> + Send;
fn read_tmds_config(
&mut self,
) -> impl Future<Output = Result<TmdsConfigReading, Self::Error>> + Send;
fn read_scrambling_status(
&mut self,
) -> impl Future<Output = Result<ScramblingStatus, Self::Error>> + Send;
fn read_sink_version(
&mut self,
) -> impl Future<Output = Result<u8, Self::Error>> + Send;
fn write_source_version(
&mut self,
version: u8,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn clear_frl_rate(
&mut self,
) -> impl Future<Output = Result<(), Self::Error>> + Send;
fn clear_flt_update(
&mut self,
) -> impl Future<Output = Result<bool, UpdateError<Self::Error>>> + Send;
}Expand description
TmdsScdc with Send futures, for code that spawns TMDS bring-up on a multi-threaded
executor.
The same methods and contract, bounded calls and cancellation included, each returning a
future that is Send, and errors that are Send too; Send is a supertrait, since the
futures borrow the implementation mutably. Every SendTmdsScdc is a TmdsScdc, through a
blanket implementation, so the driver takes either; a type implements one of the two.
Bound generic code by SendTmdsScdc alone: with S: SendTmdsScdc + TmdsScdc the
compiler uses the explicit TmdsScdc bound instead of the blanket implementation, and the
futures are no longer known to be Send. With both traits in scope a method call on a
SendTmdsScdc type is ambiguous: import only the trait the code is bounded by, or call
SendTmdsScdc::read_tmds_config(…).
Required Associated Types§
Sourcetype Error: DdcError + Send
type Error: DdcError + Send
The error of one transfer, classified by DdcError::kind.
Required Methods§
Sourcefn write_tmds_config(
&mut self,
config: SinkTmdsConfig,
) -> impl Future<Output = Result<(), Self::Error>> + Send
fn write_tmds_config( &mut self, config: SinkTmdsConfig, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Sourcefn update_tmds_config(
&mut self,
config: SinkTmdsConfig,
) -> impl Future<Output = Result<(), UpdateError<Self::Error>>> + Send
fn update_tmds_config( &mut self, config: SinkTmdsConfig, ) -> impl Future<Output = Result<(), UpdateError<Self::Error>>> + Send
Sourcefn read_tmds_config(
&mut self,
) -> impl Future<Output = Result<TmdsConfigReading, Self::Error>> + Send
fn read_tmds_config( &mut self, ) -> impl Future<Output = Result<TmdsConfigReading, Self::Error>> + Send
Sourcefn read_scrambling_status(
&mut self,
) -> impl Future<Output = Result<ScramblingStatus, Self::Error>> + Send
fn read_scrambling_status( &mut self, ) -> impl Future<Output = Result<ScramblingStatus, Self::Error>> + Send
Sourcefn write_source_version(
&mut self,
version: u8,
) -> impl Future<Output = Result<(), Self::Error>> + Send
fn write_source_version( &mut self, version: u8, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Sourcefn clear_flt_update(
&mut self,
) -> impl Future<Output = Result<bool, UpdateError<Self::Error>>> + Send
fn clear_flt_update( &mut self, ) -> impl Future<Output = Result<bool, UpdateError<Self::Error>>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".