pub trait DeviceServerHandler<___T: Transport = Channel> {
// Required methods
fn register_power_domain(
&mut self,
request: Request<RegisterPowerDomain, ___T>,
responder: Responder<RegisterPowerDomain, ___T>,
) -> impl Future<Output = ()> + Send;
fn unregister_power_domain(
&mut self,
responder: Responder<UnregisterPowerDomain, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_supported_voltage_range(
&mut self,
responder: Responder<GetSupportedVoltageRange, ___T>,
) -> impl Future<Output = ()> + Send;
fn request_voltage(
&mut self,
request: Request<RequestVoltage, ___T>,
responder: Responder<RequestVoltage, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_current_voltage(
&mut self,
request: Request<GetCurrentVoltage, ___T>,
responder: Responder<GetCurrentVoltage, ___T>,
) -> impl Future<Output = ()> + Send;
fn get_power_domain_status(
&mut self,
responder: Responder<GetPowerDomainStatus, ___T>,
) -> impl Future<Output = ()> + Send;
fn write_pmic_ctrl_reg(
&mut self,
request: Request<WritePmicCtrlReg, ___T>,
responder: Responder<WritePmicCtrlReg, ___T>,
) -> impl Future<Output = ()> + Send;
fn read_pmic_ctrl_reg(
&mut self,
request: Request<ReadPmicCtrlReg, ___T>,
responder: Responder<ReadPmicCtrlReg, ___T>,
) -> impl Future<Output = ()> + Send;
}Expand description
A server handler for the Device protocol.
See Device for more details.
Required Methods§
Sourcefn register_power_domain(
&mut self,
request: Request<RegisterPowerDomain, ___T>,
responder: Responder<RegisterPowerDomain, ___T>,
) -> impl Future<Output = ()> + Send
fn register_power_domain( &mut self, request: Request<RegisterPowerDomain, ___T>, responder: Responder<RegisterPowerDomain, ___T>, ) -> impl Future<Output = ()> + Send
Register the callee for this power domain. The callee will be registered until UnregisterPowerDomain is called. Any voltage changes to the power domain will be made considering the min_needed_voltage(in uV) and max_supported_voltage(in uV) published here. If voltages mentioned are out of supported voltage range of domain(obtained by calling GetSupportedVoltageRange), the callee will be registered with the supported voltage range.
Sourcefn unregister_power_domain(
&mut self,
responder: Responder<UnregisterPowerDomain, ___T>,
) -> impl Future<Output = ()> + Send
fn unregister_power_domain( &mut self, responder: Responder<UnregisterPowerDomain, ___T>, ) -> impl Future<Output = ()> + Send
Unregister the callee for this power domain. The callee will no longer be considered as a dependent of this power domain.
Sourcefn get_supported_voltage_range(
&mut self,
responder: Responder<GetSupportedVoltageRange, ___T>,
) -> impl Future<Output = ()> + Send
fn get_supported_voltage_range( &mut self, responder: Responder<GetSupportedVoltageRange, ___T>, ) -> impl Future<Output = ()> + Send
Get Supported Voltage Range. min and max are in micorVolts(uV)
Sourcefn request_voltage(
&mut self,
request: Request<RequestVoltage, ___T>,
responder: Responder<RequestVoltage, ___T>,
) -> impl Future<Output = ()> + Send
fn request_voltage( &mut self, request: Request<RequestVoltage, ___T>, responder: Responder<RequestVoltage, ___T>, ) -> impl Future<Output = ()> + Send
Request a particular voltage. The actual_voltage is the voltage that the power domain is transitioned to after considering supported voltage ranges of all the registered dependents. “voltage” should be in uV.
Sourcefn get_current_voltage(
&mut self,
request: Request<GetCurrentVoltage, ___T>,
responder: Responder<GetCurrentVoltage, ___T>,
) -> impl Future<Output = ()> + Send
fn get_current_voltage( &mut self, request: Request<GetCurrentVoltage, ___T>, responder: Responder<GetCurrentVoltage, ___T>, ) -> impl Future<Output = ()> + Send
Get current voltage in uV.
Sourcefn get_power_domain_status(
&mut self,
responder: Responder<GetPowerDomainStatus, ___T>,
) -> impl Future<Output = ()> + Send
fn get_power_domain_status( &mut self, responder: Responder<GetPowerDomainStatus, ___T>, ) -> impl Future<Output = ()> + Send
Get power domain status
Sourcefn write_pmic_ctrl_reg(
&mut self,
request: Request<WritePmicCtrlReg, ___T>,
responder: Responder<WritePmicCtrlReg, ___T>,
) -> impl Future<Output = ()> + Send
fn write_pmic_ctrl_reg( &mut self, request: Request<WritePmicCtrlReg, ___T>, responder: Responder<WritePmicCtrlReg, ___T>, ) -> impl Future<Output = ()> + Send
Write to ctrl register of PMIC
Sourcefn read_pmic_ctrl_reg(
&mut self,
request: Request<ReadPmicCtrlReg, ___T>,
responder: Responder<ReadPmicCtrlReg, ___T>,
) -> impl Future<Output = ()> + Send
fn read_pmic_ctrl_reg( &mut self, request: Request<ReadPmicCtrlReg, ___T>, responder: Responder<ReadPmicCtrlReg, ___T>, ) -> impl Future<Output = ()> + Send
Read ctrl register of PMIC
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".