pub struct Layer {
pub ocg_id: u32,
pub name: String,
pub intent: LayerIntent,
pub locked: bool,
pub usage: LayerUsage,
pub creator_info: Option<CreatorInfo>,
pub default_visible: bool,
}Expand description
One Optional Content Group (PDF “layer”).
Fields§
§ocg_id: u32PDF object number of the OCG dict — stable across renders and
the canonical key for matching layers to display-list
OcgGroup elements.
name: String/Name — UTF-8 decoded display label for layer panels.
intent: LayerIntent/Intent — author’s hint about which contexts this layer is
meaningful in. Default View.
locked: boolTrue when listed in /OCProperties /D /Locked. UI consumers
should disable user-driven toggling for locked layers; the
reader does not enforce this.
usage: LayerUsage/Usage sub-dict — context-specific hints (view/print/export
state, zoom range, language, page-element role, etc.).
creator_info: Option<CreatorInfo>/CreatorInfo on the OCG itself, if present. The same
sub-dict can also appear under /Usage; Phase 1 captures
both.
default_visible: boolInitial visibility under the default configuration. Derived
from membership in /OCProperties /D /OFF (false) or /ON
(true); absent OCGs default to true per ISO 32000-2.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Layer
impl RefUnwindSafe for Layer
impl Send for Layer
impl Sync for Layer
impl Unpin for Layer
impl UnsafeUnpin for Layer
impl UnwindSafe for Layer
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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