-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e37fe44
commit d085422
Showing
8 changed files
with
93 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#![allow(non_upper_case_globals)] | ||
|
||
pub(super) mod attached_file; | ||
mod simple_tag; | ||
pub(super) mod simple_tag; | ||
pub(super) mod tags; | ||
pub(super) mod target; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
use crate::ebml::tag::write::{write_element, ElementWriterCtx, WriteableElement}; | ||
use crate::ebml::{ElementId, SimpleTag, TagRef}; | ||
use crate::io::FileLike; | ||
|
||
use std::borrow::Cow; | ||
use std::io::Cursor; | ||
|
||
impl<'a, I> WriteableElement for TagRef<'a, I> | ||
where | ||
I: Iterator<Item = Cow<'a, SimpleTag<'a>>>, | ||
{ | ||
const ID: ElementId = ElementId(0x7373); | ||
|
||
fn write_element<F: FileLike>( | ||
&self, | ||
ctx: ElementWriterCtx, | ||
writer: &mut F, | ||
) -> crate::error::Result<()> { | ||
let mut element_children = Cursor::new(Vec::new()); | ||
self.targets.write_element(ctx, &mut element_children)?; | ||
|
||
// TODO | ||
// for simple_tag in self.simple_tags { | ||
// simple_tag.write_element(ctx, &mut element_children)?; | ||
// } | ||
|
||
write_element( | ||
ctx, | ||
Self::ID, | ||
&element_children.get_ref().as_slice(), | ||
writer, | ||
)?; | ||
|
||
Ok(()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|