docx-rs 0.4.20

A .docx file writer with Rust/WebAssembly.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::reader::OwnedAttribute;

pub fn read_id(attrs: &[OwnedAttribute]) -> Option<String> {
    for a in attrs {
        let local_name = &a.name.local_name;
        if local_name == "id" {
            return Some(a.value.to_owned());
        }
    }
    None
}