pub enum ReadWriteAccountRequest {
GetOwner {
responder: ReadWriteAccountGetOwnerResponder,
},
GetBalance {
responder: ReadWriteAccountGetBalanceResponder,
},
Debit {
amount: i64,
responder: ReadWriteAccountDebitResponder,
},
Credit {
amount: i64,
responder: ReadWriteAccountCreditResponder,
},
}
Expand description
Provides read-write access to a bank account.
Variants§
GetOwner
Returns the bank account owner’s name.
Fields
§
responder: ReadWriteAccountGetOwnerResponder
GetBalance
Returns the bank account’s current balance in cents.
Fields
§
responder: ReadWriteAccountGetBalanceResponder
Debit
Withdraws amount
cents from the bank account.
Returns false if the account had insufficient funds.
Credit
Deposits amount
cents to the bank account.
Implementations§
Source§impl ReadWriteAccountRequest
impl ReadWriteAccountRequest
pub fn into_get_owner(self) -> Option<ReadWriteAccountGetOwnerResponder>
pub fn into_get_balance(self) -> Option<ReadWriteAccountGetBalanceResponder>
pub fn into_debit(self) -> Option<(i64, ReadWriteAccountDebitResponder)>
pub fn into_credit(self) -> Option<(i64, ReadWriteAccountCreditResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReadWriteAccountRequest
impl !RefUnwindSafe for ReadWriteAccountRequest
impl Send for ReadWriteAccountRequest
impl Sync for ReadWriteAccountRequest
impl Unpin for ReadWriteAccountRequest
impl !UnwindSafe for ReadWriteAccountRequest
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