pub struct ImageGlobalSettings { /* private fields */ }Expand description
Safe wrapper for managing wkhtmltoimage global settings
Implementations§
Source§impl ImageGlobalSettings
impl ImageGlobalSettings
Sourcepub fn new() -> Result<ImageGlobalSettings>
pub fn new() -> Result<ImageGlobalSettings>
Instantiate ImageGlobalSettings
This may only be called after image_init has successfully initialized wkhtmltoimage
Sourcepub unsafe fn set(&mut self, name: &str, value: &str) -> Result<()>
pub unsafe fn set(&mut self, name: &str, value: &str) -> Result<()>
Set a global setting for the wkhtmltoimage instance
§Safety
Unsafe as it may cause undefined behavior (generally segfault) if name or value are not valid
Sourcepub fn create_converter(self) -> ImageConverter
pub fn create_converter(self) -> ImageConverter
call wkhtmltoimage_create_convert which consumes global_settings and thus we no longer need concern ourselves with deleting it
Auto Trait Implementations§
impl Freeze for ImageGlobalSettings
impl RefUnwindSafe for ImageGlobalSettings
impl !Send for ImageGlobalSettings
impl !Sync for ImageGlobalSettings
impl Unpin for ImageGlobalSettings
impl UnwindSafe for ImageGlobalSettings
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