Hi there! I have some struct that have Debug formating:
#[derive(Debug)]
struct ... {
...,
sembuf: libc::sembuf,
}
But i got an error:
sembuf
cannot be formatted using{:?}
because it doesn't implementDebug
.
If i implement Debug for libc::sembuf i got another error:
impl doesn't use only types from inside the current crate
Simple implematation:
impl fmt::Debug for libc::sembuf {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, {}", self.sem_num)
}
}
Please, help. How can i resolve this problem? Because I need debug information for a number of structures that borrow each other in fields.