pub struct Protocol { /* private fields */ }
Expand description
The NXP bootloader protocol. Interact via fn call(Command) -> Result<Response>
Implementations§
Source§impl Protocol
impl Protocol
pub fn property(&self, property: Property) -> Result<Vec<u32>, Error>
pub fn call(&self, command: &Command) -> Result<Response>
pub fn call_progress<'a>( &self, command: &Command, progress: Option<&'a dyn Fn(usize)>, ) -> Result<Response>
pub fn read_packet(&self) -> Result<ReceivedPacket>
pub fn write(&self, data: &[u8]) -> Result<()>
pub fn read_timeout(&self, timeout: usize) -> HidResult<Vec<u8>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Protocol
impl !RefUnwindSafe for Protocol
impl Send for Protocol
impl !Sync for Protocol
impl Unpin for Protocol
impl !UnwindSafe for Protocol
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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