pub struct Document {
pub version: String,
pub root: Node,
}Expand description
A whole document.
Fields§
§version: String0100 or 0110.
root: NodeThe root node.
Implementations§
Source§impl Document
impl Document
Sourcepub fn parse(data: &[u8]) -> Result<Self>
pub fn parse(data: &[u8]) -> Result<Self>
Parses a “cmt “ document (checks the magic, the version and the CRC).
Sourcepub fn to_bytes(&self) -> Result<Vec<u8>>
pub fn to_bytes(&self) -> Result<Vec<u8>>
The document bytes with a new CRC; an unchanged document gives the same bytes.
Sourcepub fn action_clip(&self) -> Option<&Node>
pub fn action_clip(&self) -> Option<&Node>
The ActionNodeClip node of a track mixer.
Sourcepub fn action_clip_mut(&mut self) -> Option<&mut Node>
pub fn action_clip_mut(&mut self) -> Option<&mut Node>
The ActionNodeClip node of a track mixer, mutably.
Trait Implementations§
impl StructuralPartialEq for Document
Auto Trait Implementations§
impl Freeze for Document
impl RefUnwindSafe for Document
impl Send for Document
impl Sync for Document
impl Unpin for Document
impl UnsafeUnpin for Document
impl UnwindSafe for Document
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more