Function id3::partial_tag_ok

source ·
pub fn partial_tag_ok(rs: Result<Tag>) -> Result<Tag>
Expand description

Takes a tag result and maps any partial tag to Ok. An Ok result is left untouched. An Err without partial tag is returned as the initial error.

§Example

use id3::{Tag, Error, ErrorKind, partial_tag_ok};

let rs = Err(Error{
    kind: ErrorKind::Parsing,
    description: "frame 12 could not be decoded".to_string(),
    partial_tag: Some(Tag::new()),
});
assert!(partial_tag_ok(rs).is_ok());