pub struct Protocol { /* private fields */ }
Expand description
The NXP bootloader protocol. Interact via fn call(Command) -> Result<Response>
Implementations
sourceimpl 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 RefUnwindSafe for Protocol
impl Send for Protocol
impl !Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more