/// Reads all text frames frame except for `TXXX`.
Reads all text frames frame except for `TXXX`.
Reads all text frames frame except for ` TXXX ` .
fn read_text_frame(
    reader: &mut BufStream<'_>,
    std_key: Option<StandardTagKey>,
    id: &str,
) -> Result<FrameResult> {
    // The first byte of the frame is the encoding.
    let encoding = match Encoding::parse(reader.read_byte()?) {
        Some(encoding) => encoding,
        _              => return decode_error("invalid text encoding")
    };
    // Since a text frame can have a null-terminated list of values, and Symphonia allows multiple tags
    // with the same key, create one Tag per listed value.
    let mut tags = Vec::<Tag>::new();
    // The remainder of the frame is one or more null-terminated strings.
    loop {
        let len = reader.bytes_available() as usize;
        if len > 0 {
            // Scan for text, and create a Tag.
            let text = scan_text(reader, encoding, len)?;
            tags.push(Tag::new(std_key, id, Value::from(text)));
        }
        else {
            break;
        }
    }
    Ok(FrameResult::MultipleTags(tags))
}
fn read_text_frame ( reader : & mut BufStream < ' _ > , std_key : Option < StandardTagKey > , id : & str , ) -> Result < FrameResult > { // The first byte of the frame is the encoding. let encoding = match Encoding :: parse ( reader . read_byte ( ) ? ) { Some ( encoding ) => encoding , _ => return decode_error ( " " ) } ; // Since a text frame can have a null-terminated list of values, and Symphonia allows multiple tags // with the same key, create one Tag per listed value. let mut tags = Vec :: < Tag > :: new ( ) ; // The remainder of the frame is one or more null-terminated strings. loop { let len = reader . bytes_available ( ) as usize ; if len > 0 { // Scan for text, and create a Tag. let text = scan_text ( reader , encoding , len ) ? ; tags . push ( Tag :: new ( std_key , id , Value :: from ( text ) ) ) ; } else { break ; } } Ok ( FrameResult :: MultipleTags ( tags ) ) }
Reads all text frames frame except for `TXXX`.
Reads all text frames frame except for ` TXXX ` .
reader
&mut BufStream<'_>
std_key
Option<StandardTagKey>
id
&str