Skip to main content

Whatsit

Enum Whatsit 

Source
pub enum Whatsit {
Show 19 variants Open { stream: u32, name: Vec<u8>, }, Write { stream: i32, data: TokenList, }, Close { stream: u32, }, Special { data: Vec<u8>, }, LateLua { data: LateData, name: Vec<u8>, }, PdfLiteral { mode: u8, data: LateData, late: bool, }, SavePos, PdfColorstack { stack: i32, cmd: u8, data: Vec<u8>, }, PdfSetmatrix { data: Vec<u8>, }, PdfSave, PdfRestore, PdfAnnot { dims: [i32; 3], objnum: i32, data: Vec<u8>, }, PdfStartLink { dims: [i32; 3], objnum: i32, attr: Vec<u8>, action: PdfAction, }, PdfEndLink, PdfDest { id: DestId, view: DestView, structure: Option<i32>, }, PdfRefobj { objnum: i32, }, PdfLinkState { state: i32, }, UserDefined { user_id: i32, value: UserValue, }, Other { fields: Vec<i64>, data: Vec<u8>, },
}
Expand description

Whatsit payloads.

Variants§

§

Open

\openout.

Fields

§stream: u32

Stream number.

§name: Vec<u8>

File name.

§

Write

\write.

Fields

§stream: i32

Stream number.

§data: TokenList

Unexpanded token list.

§

Close

\closeout.

Fields

§stream: u32

Stream number.

§

Special

\special.

Fields

§data: Vec<u8>

The text.

§

LateLua

\latelua.

Fields

§data: LateData

Token list or string.

§name: Vec<u8>

Chunk name.

§

PdfLiteral

\pdfextension literal and friends.

Fields

§mode: u8

Mode (0 origin, 1 page, 2 direct, …).

§data: LateData

Data.

§late: bool

Whether this is a late literal.

§

SavePos

\savepos.

§

PdfColorstack

\pdfextension colorstack.

Fields

§stack: i32

Stack number.

§cmd: u8

Command (set, push, pop, current).

§data: Vec<u8>

Data.

§

PdfSetmatrix

\pdfextension setmatrix.

Fields

§data: Vec<u8>

The matrix text.

§

PdfSave

\pdfextension save.

§

PdfRestore

\pdfextension restore.

§

PdfAnnot

\pdfextension annot.

Fields

§dims: [i32; 3]

width, height, depth (RUNNING when not given).

§objnum: i32

The annotation’s object number.

§data: Vec<u8>

The annotation’s text.

\pdfextension startlink.

Fields

§dims: [i32; 3]

width, height, depth (RUNNING when not given).

§objnum: i32

The object number of the link’s first annotation.

§attr: Vec<u8>

attr {…}.

§action: PdfAction

The action.

\pdfextension endlink.

§

PdfDest

\pdfextension dest.

Fields

§id: DestId

The destination’s identifier.

§view: DestView

The view.

§structure: Option<i32>

struct n: a structure destination for structure element object n.

§

PdfRefobj

\pdfextension refobj.

Fields

§objnum: i32

The object number.

§

PdfLinkState

\pdfextension linkstate.

Fields

§state: i32

The state (0 links on, 1 links off).

§

UserDefined

A user_defined whatsit (made from Lua).

Fields

§user_id: i32

user_id.

§value: UserValue

The value, by type.

§

Other

Other whatsits, kept opaque for now.

Fields

§fields: Vec<i64>

Raw fields.

§data: Vec<u8>

Raw data.

Trait Implementations§

Source§

impl Clone for Whatsit

Source§

fn clone(&self) -> Self

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 Whatsit

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Whatsit

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Whatsit

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> ErasedDestructor for T
where T: 'static,

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.