mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Rewrite async runtime handling and port to tracing
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
use plist::Value;
|
||||
use tokio::io::{AsyncRead, AsyncReadExt};
|
||||
|
||||
use crate::IdeviceError;
|
||||
use crate::{IdeviceError, pretty_print_plist};
|
||||
|
||||
/// Message header containing metadata about the message
|
||||
///
|
||||
@@ -141,7 +141,7 @@ pub enum AuxValue {
|
||||
}
|
||||
|
||||
/// Complete protocol message
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[derive(PartialEq)]
|
||||
pub struct Message {
|
||||
/// Message metadata header
|
||||
pub message_header: MessageHeader,
|
||||
@@ -525,3 +525,14 @@ impl std::fmt::Debug for AuxValue {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for Message {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("Message")
|
||||
.field("message_header", &self.message_header)
|
||||
.field("payload_header", &self.payload_header)
|
||||
.field("aux", &self.aux)
|
||||
.field("data", &self.data.as_ref().map(pretty_print_plist))
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user