pub struct TransportNativeBle { /* private fields */ }
Implementations§
Source§impl TransportNativeBle
impl TransportNativeBle
Sourcepub async fn list_ledgers(
manager: &Manager,
) -> Result<Vec<Peripheral>, LedgerBleError>
pub async fn list_ledgers( manager: &Manager, ) -> Result<Vec<Peripheral>, LedgerBleError>
Get a list of ledger devices available
Sourcepub async fn new(manager: &Manager) -> Result<Vec<Self>, LedgerBleError>
pub async fn new(manager: &Manager) -> Result<Vec<Self>, LedgerBleError>
Create a new BLE transport, returns a vector of available devices
Sourcepub async fn connect(peripheral: Peripheral) -> Result<Self, LedgerBleError>
pub async fn connect(peripheral: Peripheral) -> Result<Self, LedgerBleError>
Create a new BLE transport, returns a vector of available devices
pub async fn exchange<I: Deref<Target = [u8]>>( &self, command: &APDUCommand<I>, ) -> Result<APDUAnswer<Vec<u8>>, LedgerBleError>
Trait Implementations§
Source§impl Debug for TransportNativeBle
impl Debug for TransportNativeBle
Source§impl Exchange for TransportNativeBle
impl Exchange for TransportNativeBle
Source§type Error = LedgerBleError
type Error = LedgerBleError
Error defined by Transport used
Source§type AnswerType = Vec<u8>
type AnswerType = Vec<u8>
The concrete type containing the APDUAnswer
Source§fn exchange<'life0, 'life1, 'async_trait, I>(
&'life0 self,
command: &'life1 APDUCommand<I>,
) -> Pin<Box<dyn Future<Output = Result<APDUAnswer<Self::AnswerType>, Self::Error>> + Send + 'async_trait>>
fn exchange<'life0, 'life1, 'async_trait, I>( &'life0 self, command: &'life1 APDUCommand<I>, ) -> Pin<Box<dyn Future<Output = Result<APDUAnswer<Self::AnswerType>, Self::Error>> + Send + 'async_trait>>
Send a command with the given transport and retrieve an answer or a transport error
Auto Trait Implementations§
impl Freeze for TransportNativeBle
impl !RefUnwindSafe for TransportNativeBle
impl Send for TransportNativeBle
impl Sync for TransportNativeBle
impl Unpin for TransportNativeBle
impl !UnwindSafe for TransportNativeBle
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