docx-reader 0.1.1

A .docx file reader in rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::sync::atomic::AtomicUsize;

static PIC_ID: AtomicUsize = AtomicUsize::new(1);

pub fn generate_pic_id() -> usize {
	use std::sync::atomic::Ordering;

	let id = PIC_ID.load(Ordering::Relaxed);
	PIC_ID.store(id.wrapping_add(1), Ordering::Relaxed);
	id
}

pub fn create_pic_rid(id: usize) -> String {
	format!("rIdImage{}", id)
}