Rewrite async runtime handling and port to tracing

This commit is contained in:
Jackson Coxson
2025-10-23 12:29:59 -06:00
parent 7527cdff7b
commit 7da735f141
28 changed files with 267 additions and 167 deletions

View File

@@ -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()
}
}