Commit 84e4546f authored by François Laignel's avatar François Laignel Committed by Sebastian Dröge

Toc: implement Debug trait

parent f92f0a99
......@@ -7,6 +7,7 @@
// except according to those terms.
use std::ffi::CStr;
use std::fmt;
use std::mem;
use ffi;
......@@ -99,6 +100,16 @@ impl ToOwned for TocRef {
}
}
impl fmt::Debug for TocRef {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("Toc")
.field("scope", &self.get_scope())
.field("tags", &self.get_tags())
.field("entries", &self.get_entries())
.finish()
}
}
unsafe impl Sync for TocRef {}
unsafe impl Send for TocRef {}
......@@ -237,6 +248,21 @@ impl ToOwned for TocEntryRef {
}
}
impl fmt::Debug for TocEntryRef {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("TocEntry")
.field("entry_type", &self.get_entry_type())
.field("uid", &self.get_uid())
.field("start_stop", &self.get_start_stop_times())
.field("tags", &self.get_tags())
.field("is_alternative", &self.is_alternative())
.field("is_sequence", &self.is_sequence())
.field("loop", &self.get_loop())
.field("sub_entries", &self.get_sub_entries())
.finish()
}
}
unsafe impl Sync for TocEntryRef {}
unsafe impl Send for TocEntryRef {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment