Skip to main content

DocDir

Struct DocDir 

Source
pub struct DocDir {
    pub index: u32,
    pub document_file_name: String,
    pub public_res_file_name: String,
    pub document_res_file_name: String,
    pub signs_dir_name: String,
    pub pages_dir_name: String,
    pub res_dir_name: String,
    pub annots_dir_name: String,
    pub annotations_file_name: String,
    pub attachments_file_name: String,
}
Expand description

文档目录。

描述单个 OFD 文档的目录结构,管理文档内的 各种子容器(页面、资源、签名、注释等)。

Fields§

§index: u32

文档索引(从 0 开始)。

§document_file_name: String

文档根节点描述文件名称。

§public_res_file_name: String

公共资源索引描述文件名称。

§document_res_file_name: String

文档自身资源索引描述文件名称。

§signs_dir_name: String

数字签名容器名称。

§pages_dir_name: String

页面容器名称。

§res_dir_name: String

资源容器名称。

§annots_dir_name: String

注释容器名称。

§annotations_file_name: String

注释入口文件名称。

§attachments_file_name: String

附件入口文件名称。

Implementations§

Source§

impl DocDir

Source

pub const DOC_CONTAINER_PREFIX: &'static str = "Doc_"

文档容器名称前缀。

Source

pub const DOCUMENT_FILE_NAME: &'static str = "Document.xml"

文档根节点描述文件名。

Source

pub const PUBLIC_RES_FILE_NAME: &'static str = "PublicRes.xml"

公共资源索引文件名。

Source

pub const DOCUMENT_RES_FILE_NAME: &'static str = "DocumentRes.xml"

文档自身资源索引文件名。

Source

pub const SIGNS_DIR_NAME: &'static str = "Signs"

数字签名容器名。

Source

pub const SIGN_CONTAINER_PREFIX: &'static str = "Sign_"

数字签名容器名称前缀。

Source

pub const TAGS_DIR_NAME: &'static str = "Tags"

自定义标签容器名。

Source

pub const TEMPS_DIR_NAME: &'static str = "Temps"

临时文件容器名。

Source

pub const PAGES_DIR_NAME: &'static str = "Pages"

页面容器名。

Source

pub const PAGE_CONTAINER_PREFIX: &'static str = "Page_"

页面容器名称前缀。

Source

pub const RES_DIR_NAME: &'static str = "Res"

资源容器名。

Source

pub const ANNOTS_DIR_NAME: &'static str = "Annots"

注释容器名。

Source

pub const ANNOTATIONS_FILE_NAME: &'static str = "Annotations.xml"

注释入口文件名。

Source

pub const ATTACHMENTS_FILE_NAME: &'static str = "Attachments.xml"

附件入口文件名。

Source

pub fn new(index: u32) -> Self

创建新的文档目录。

Source

pub fn container_name(&self) -> String

获取文档容器目录名。

Source

pub fn index(&self) -> u32

获取文档索引。

Trait Implementations§

Source§

impl Clone for DocDir

Source§

fn clone(&self) -> DocDir

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DocDir

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.