pub struct FormActionFlags(/* private fields */);
Expand description
A set of flags specifying various characteristics of an Action
.
Implementations§
source§impl FormActionFlags
impl FormActionFlags
sourcepub const INCLUDE_EXCLUDE: Self = _
pub const INCLUDE_EXCLUDE: Self = _
Whether to include (unset) or exclude (set) the values in the
/Fields
attribute on form submission or reset. This Flag has very
specific interacitons with other flags and fields, read the PDF 1.7
spec for more info.
sourcepub const INCLUDE_NO_VALUE_FIELDS: Self = _
pub const INCLUDE_NO_VALUE_FIELDS: Self = _
Fields shall be submitted regardless of if they have a value or not, otherwise they are excluded.
sourcepub const EXPORT_FORMAT: Self = _
pub const EXPORT_FORMAT: Self = _
Export the fields as HTML instead of submitting as FDF. Ignored if
SUBMIT_PDF
or XFDF
are set.
sourcepub const GET_METHOD: Self = _
pub const GET_METHOD: Self = _
Field name should be submitted using an HTTP GET request, otherwise
POST. Should only be if EXPORT_FORMAT
is also set.
sourcepub const SUBMIT_COORDINATES: Self = _
pub const SUBMIT_COORDINATES: Self = _
Include the coordinates of the mouse when submit was pressed. Should
only be if EXPORT_FORMAT
is also set.
sourcepub const XFDF: Self = _
pub const XFDF: Self = _
Submit field names and values as XFDF instead of submitting an FDF.
Should not be set if SUBMIT_PDF
is set. PDF1.4+.
sourcepub const INCLUDE_APPEND_SAVES: Self = _
pub const INCLUDE_APPEND_SAVES: Self = _
Include all updates done to the PDF document in the submission FDF
file. Should only be used when XFDF
and EXPORT_FORMAT
are not
set. PDF 1.4+.
sourcepub const INCLUDE_ANNOTATIONS: Self = _
pub const INCLUDE_ANNOTATIONS: Self = _
Include all markup annotations of the PDF dcoument in the submission
FDF file. Should only be used when XFDF
and EXPORT_FORMAT
are
not set. PDF 1.4+.
sourcepub const SUBMIT_PDF: Self = _
pub const SUBMIT_PDF: Self = _
Submit the PDF file instead of an FDF file. All other flags other
than GET_METHOD
are ignored if this is set. PDF 1.4+.
sourcepub const CANONICAL_FORMAT: Self = _
pub const CANONICAL_FORMAT: Self = _
Convert fields which represent dates into the canonical date format. The interpretation of a form field as a date is is not specified in the field but the JavaScript code that processes it. PDF 1.4+.
sourcepub const EXCLUDE_NON_USER_ANNOTS: Self = _
pub const EXCLUDE_NON_USER_ANNOTS: Self = _
Include only the markup annotations made by the current user (the
/T
entry of the annotation) as determined by the remote server
the form will be submitted to. Should only be used when XFDF
and
EXPORT_FORMAT
are not set and INCLUDE_ANNOTATIONS
is set. PDF
1.4+.
sourcepub const EXCLUDE_F_KEY: Self = _
pub const EXCLUDE_F_KEY: Self = _
Include the F entry in the FDF file.
Should only be used when XFDF
and EXPORT_FORMAT
are not set.
PDF 1.4+
sourcepub const EMBED_FORM: Self = _
pub const EMBED_FORM: Self = _
Include the PDF file as a stream in the FDF file that will be submitted.
Should only be used when XFDF
and EXPORT_FORMAT
are not set.
PDF 1.5+.
source§impl FormActionFlags
impl FormActionFlags
sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
sourcepub const fn from_bits(bits: u32) -> Option<Self>
pub const fn from_bits(bits: u32) -> Option<Self>
Convert from a bits value.
This method will return None
if any unknown bits are set.
sourcepub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_bits_truncate(bits: u32) -> Self
Convert from a bits value, unsetting any unknown bits.
sourcepub const fn from_bits_retain(bits: u32) -> Self
pub const fn from_bits_retain(bits: u32) -> Self
Convert from a bits value exactly.
sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
Get a flags value with the bits of a flag with the given name set.
This method will return None
if name
is empty or doesn’t
correspond to any named flag.
sourcepub const fn intersects(&self, other: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in a source flags value are also set in a target flags value.
sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in a source flags value are also set in a target flags value.
sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
remove
won’t truncate other
, but the !
operator will.
sourcepub fn toggle(&mut self, other: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert
when value
is true
or remove
when value
is false
.
sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&
) of the bits in two flags values.
sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|
) of the bits in two flags values.
sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
sourcepub const fn symmetric_difference(self, other: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^
) of the bits in two flags values.
sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!
) of the bits in a flags value, truncating the result.
source§impl FormActionFlags
impl FormActionFlags
sourcepub const fn iter(&self) -> Iter<FormActionFlags>
pub const fn iter(&self) -> Iter<FormActionFlags>
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
sourcepub const fn iter_names(&self) -> IterNames<FormActionFlags>
pub const fn iter_names(&self) -> IterNames<FormActionFlags>
Yield a set of contained named flags values.
This method is like iter
, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
source§impl Binary for FormActionFlags
impl Binary for FormActionFlags
source§impl BitAnd for FormActionFlags
impl BitAnd for FormActionFlags
source§impl BitAndAssign for FormActionFlags
impl BitAndAssign for FormActionFlags
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&
) of the bits in two flags values.
source§impl BitOr for FormActionFlags
impl BitOr for FormActionFlags
source§fn bitor(self, other: FormActionFlags) -> Self
fn bitor(self, other: FormActionFlags) -> Self
The bitwise or (|
) of the bits in two flags values.
source§type Output = FormActionFlags
type Output = FormActionFlags
|
operator.source§impl BitOrAssign for FormActionFlags
impl BitOrAssign for FormActionFlags
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|
) of the bits in two flags values.
source§impl BitXor for FormActionFlags
impl BitXor for FormActionFlags
source§impl BitXorAssign for FormActionFlags
impl BitXorAssign for FormActionFlags
source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^
) of the bits in two flags values.
source§impl Extend<FormActionFlags> for FormActionFlags
impl Extend<FormActionFlags> for FormActionFlags
source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|
) of the bits in each flags value.
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)source§impl Flags for FormActionFlags
impl Flags for FormActionFlags
source§const FLAGS: &'static [Flag<FormActionFlags>] = _
const FLAGS: &'static [Flag<FormActionFlags>] = _
source§fn from_bits_retain(bits: u32) -> FormActionFlags
fn from_bits_retain(bits: u32) -> FormActionFlags
source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
source§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|
) of the bits in two flags values.source§fn remove(&mut self, other: Self)where
Self: Sized,
fn remove(&mut self, other: Self)where
Self: Sized,
&!
). Read moresource§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^
) of the bits in two flags values.source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&
) of the bits in two flags values.source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
&!
). Read moresource§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^
) of the bits in two flags values.source§fn complement(self) -> Self
fn complement(self) -> Self
!
) of the bits in a flags value, truncating the result.source§impl FromIterator<FormActionFlags> for FormActionFlags
impl FromIterator<FormActionFlags> for FormActionFlags
source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|
) of the bits in each flags value.
source§impl IntoIterator for FormActionFlags
impl IntoIterator for FormActionFlags
source§impl LowerHex for FormActionFlags
impl LowerHex for FormActionFlags
source§impl Not for FormActionFlags
impl Not for FormActionFlags
source§impl Octal for FormActionFlags
impl Octal for FormActionFlags
source§impl PublicFlags for FormActionFlags
impl PublicFlags for FormActionFlags
source§impl Sub for FormActionFlags
impl Sub for FormActionFlags
source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.
source§type Output = FormActionFlags
type Output = FormActionFlags
-
operator.source§impl SubAssign for FormActionFlags
impl SubAssign for FormActionFlags
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
The intersection of a source flags value with the complement of a target flags value (&!
).
This method is not equivalent to self & !other
when other
has unknown bits set.
difference
won’t truncate other
, but the !
operator will.