pub struct PdfFieldDescriptor {
pub field_name: String,
pub rust_field_name: String,
pub order: u32,
pub format: Option<String>,
pub default_value: Option<String>,
pub required: bool,
pub nested: bool,
}Expand description
PdfModel 中单个字段的描述符,由派生宏生成。
携带 #[pdf(field = "...", order = N, ...)] 属性的元数据,
用于模板填充和验证逻辑。
Fields§
§field_name: String映射到的 PDF 表单字段名称。
rust_field_name: StringRust 字段名称。
order: u32显示顺序(值越小越靠前)。
format: Option<String>可选的格式字符串(如日期的 “YYYY-MM-DD”)。
default_value: Option<String>默认值表达式(字符串形式),如果指定。
required: bool此字段是否必填。
nested: bool是否为嵌套子模型。
Implementations§
Trait Implementations§
Source§impl Clone for PdfFieldDescriptor
impl Clone for PdfFieldDescriptor
Source§fn clone(&self) -> PdfFieldDescriptor
fn clone(&self) -> PdfFieldDescriptor
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 moreAuto Trait Implementations§
impl Freeze for PdfFieldDescriptor
impl RefUnwindSafe for PdfFieldDescriptor
impl Send for PdfFieldDescriptor
impl Sync for PdfFieldDescriptor
impl Unpin for PdfFieldDescriptor
impl UnsafeUnpin for PdfFieldDescriptor
impl UnwindSafe for PdfFieldDescriptor
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 more