pub struct PdfMetadata {
pub title: Option<String>,
pub author: Option<String>,
pub subject: Option<String>,
pub keywords: Option<String>,
pub creator: Option<String>,
pub producer: Option<String>,
}Expand description
PDF 文档级元数据。
映射到 PDF 文件中的 /Info 字典。
Fields§
§title: Option<String>文档标题。
文档作者。
subject: Option<String>文档主题。
keywords: Option<String>与文档关联的关键词。
creator: Option<String>创建原始文档的应用程序。
producer: Option<String>生成此 PDF 的应用程序(自动填充)。
Implementations§
Source§impl PdfMetadata
impl PdfMetadata
Sourcepub fn new() -> PdfMetadata
pub fn new() -> PdfMetadata
创建所有字段为空的元数据。
Sourcepub fn title(self, title: impl Into<String>) -> PdfMetadata
pub fn title(self, title: impl Into<String>) -> PdfMetadata
设置标题。
设置作者。
Sourcepub fn subject(self, subject: impl Into<String>) -> PdfMetadata
pub fn subject(self, subject: impl Into<String>) -> PdfMetadata
设置主题。
Sourcepub fn keywords(self, keywords: impl Into<String>) -> PdfMetadata
pub fn keywords(self, keywords: impl Into<String>) -> PdfMetadata
设置关键词(逗号分隔)。
Trait Implementations§
Source§impl Clone for PdfMetadata
impl Clone for PdfMetadata
Source§fn clone(&self) -> PdfMetadata
fn clone(&self) -> PdfMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PdfMetadata
impl Debug for PdfMetadata
Source§impl Default for PdfMetadata
impl Default for PdfMetadata
Source§fn default() -> PdfMetadata
fn default() -> PdfMetadata
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PdfMetadata
impl RefUnwindSafe for PdfMetadata
impl Send for PdfMetadata
impl Sync for PdfMetadata
impl Unpin for PdfMetadata
impl UnsafeUnpin for PdfMetadata
impl UnwindSafe for PdfMetadata
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.