#[repr(C)]
pub struct FPDF_FILEACCESS { pub m_FileLen: c_ulong, pub m_GetBlock: Option<unsafe extern "C" fn(param: *mut c_void, position: c_ulong, pBuf: *mut c_uchar, size: c_ulong) -> c_int>, pub m_Param: *mut c_void, }
Expand description

Structure for custom file access.

Fields

m_FileLen: c_ulong

File length, in bytes.

m_GetBlock: Option<unsafe extern "C" fn(param: *mut c_void, position: c_ulong, pBuf: *mut c_uchar, size: c_ulong) -> c_int>

A function pointer for getting a block of data from a specific position. Position is specified by byte offset from the beginning of the file. The pointer to the buffer is never NULL and the size is never 0. The position and size will never go out of range of the file length. It may be possible for FPDFSDK to call this function multiple times for the same position. Return value: should be non-zero if successful, zero for error.

m_Param: *mut c_void

A custom pointer for all implementation specific data. This pointer will be used as the first parameter to the m_GetBlock callback.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.