pub struct SourceGetBatteryInfoResponder { /* private fields */ }
Implementations§
Source§impl SourceGetBatteryInfoResponder
impl SourceGetBatteryInfoResponder
Sourcepub fn send(self, status: i32, info: &BatteryInfo) -> Result<(), Error>
pub fn send(self, status: i32, info: &BatteryInfo) -> Result<(), Error>
Sends a response to the FIDL transaction.
Sets the channel to shutdown if an error occurs.
Sourcepub fn send_no_shutdown_on_err(
self,
status: i32,
info: &BatteryInfo,
) -> Result<(), Error>
pub fn send_no_shutdown_on_err( self, status: i32, info: &BatteryInfo, ) -> Result<(), Error>
Similar to “send” but does not shutdown the channel if an error occurs.
Trait Implementations§
Source§impl Drop for SourceGetBatteryInfoResponder
impl Drop for SourceGetBatteryInfoResponder
Set the the channel to be shutdown (see SourceControlHandle::shutdown
)
if the responder is dropped without sending a response, so that the client
doesn’t hang. To prevent this behavior, call drop_without_shutdown
.
Source§impl Responder for SourceGetBatteryInfoResponder
impl Responder for SourceGetBatteryInfoResponder
Source§type ControlHandle = SourceControlHandle
type ControlHandle = SourceControlHandle
The control handle for this protocol.
Source§fn control_handle(&self) -> &SourceControlHandle
fn control_handle(&self) -> &SourceControlHandle
Returns the
ControlHandle
for this protocol.Source§fn drop_without_shutdown(self)
fn drop_without_shutdown(self)
Drops the responder without setting the channel to shutdown. Read more
Auto Trait Implementations§
impl Freeze for SourceGetBatteryInfoResponder
impl !RefUnwindSafe for SourceGetBatteryInfoResponder
impl Send for SourceGetBatteryInfoResponder
impl Sync for SourceGetBatteryInfoResponder
impl Unpin for SourceGetBatteryInfoResponder
impl !UnwindSafe for SourceGetBatteryInfoResponder
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