pub struct FormatInitializer { /* private fields */ }Expand description
Builder for a cached FormatImage initialized from package resources.
Implementations§
Source§impl FormatInitializer
impl FormatInitializer
Sourcepub fn new(id: impl Into<String>, profile: ProfileId) -> Self
pub fn new(id: impl Into<String>, profile: ProfileId) -> Self
Create a new empty format initializer for the given id and profile.
Sourcepub fn preload_tex_input(self, input: impl Into<String>) -> Self
pub fn preload_tex_input(self, input: impl Into<String>) -> Self
Queue a TeX input file to load during format initialization.
Sourcepub fn preload_package(self, package: impl Into<String>) -> Self
pub fn preload_package(self, package: impl Into<String>) -> Self
Queue a package style file to load during format initialization.
Sourcepub fn macro_definition(
self,
name: impl Into<String>,
replacement: impl Into<Vec<u8>>,
) -> Self
pub fn macro_definition( self, name: impl Into<String>, replacement: impl Into<Vec<u8>>, ) -> Self
Add a macro definition to embed in the format.
Sourcepub fn registers(self, registers: RegisterSnapshot) -> Self
pub fn registers(self, registers: RegisterSnapshot) -> Self
Set the initial register snapshot to embed in the format.
Sourcepub fn opaque_engine_state(self, bytes: impl Into<Vec<u8>>) -> Self
pub fn opaque_engine_state(self, bytes: impl Into<Vec<u8>>) -> Self
Append opaque engine seed bytes to embed in the format.
Sourcepub fn build<R>(self, resources: &R) -> Result<FormatImage, FormatInitError>where
R: ResourceProvider,
pub fn build<R>(self, resources: &R) -> Result<FormatImage, FormatInitError>where
R: ResourceProvider,
Build the cached format by resolving preloaded resources once.
Trait Implementations§
Source§impl Clone for FormatInitializer
impl Clone for FormatInitializer
Source§fn clone(&self) -> FormatInitializer
fn clone(&self) -> FormatInitializer
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 moreSource§impl Debug for FormatInitializer
impl Debug for FormatInitializer
impl Eq for FormatInitializer
Source§impl PartialEq for FormatInitializer
impl PartialEq for FormatInitializer
impl StructuralPartialEq for FormatInitializer
Auto Trait Implementations§
impl Freeze for FormatInitializer
impl RefUnwindSafe for FormatInitializer
impl Send for FormatInitializer
impl Sync for FormatInitializer
impl Unpin for FormatInitializer
impl UnsafeUnpin for FormatInitializer
impl UnwindSafe for FormatInitializer
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
Mutably borrows from an owned value. Read more