Vips

Struct Vips 

Source
pub struct Vips;

Implementations§

Source§

impl Vips

That’s the main type of this crate. Use it to initialize the system

Source

pub fn init(name: &str) -> Result<()>

Starts up libvips

Source

pub fn leak_set(leak: bool)

Turn on or off vips leak checking.

Source

pub fn progress_set(flag: bool)

A structure available to eval callbacks giving information on evaluation progress

Source

pub fn get_disc_threshold() -> u64

Return the number of bytes at which we flip between open via memory and open via disc

Source

pub fn version_string() -> Result<String>

Get the VIPS version as a static string, including a build date and time.

Source

pub fn thread_shutdown()

Free any thread-private data and flush any profiling information.

Source

pub fn error_buffer() -> Result<String>

Get a pointer to the start of the error buffer as string

Source

pub fn error(domain: &str, error: &str) -> Result<()>

Format the string in the style of printf() and append to the error buffer.

Source

pub fn error_system(code: i32, domain: &str, error: &str) -> Result<()>

Format the string in the style of printf() and append to the error buffer. Then create and append a localised message based on the system error code, usually the value of errno

Source

pub fn freeze_error_buffer()

Stop errors being logged. Use [func@error_thaw] to unfreeze

Source

pub fn error_clear()

Clear and reset the error buffer.

Source

pub fn error_thaw()

Re-enable error logging.

Source

pub fn error_exit(error: &str) -> Result<()>

Sends a formatted error message to stderr, then sends the contents of the error buffer, if any, then shuts down vips and terminates the program with an error code.

Source

pub fn cache_print()

Print the whole operation cache to stdout. Handy for debugging.

Source

pub fn cache_set_max(max: i32)

Set the maximum number of operations we keep in cache.

Source

pub fn cache_set_max_mem(max: u64)

Set the maximum amount of tracked memory we allow before we start dropping cached operations.

Source

pub fn cache_set_max_files(max: i32)

Set the maximum number of tracked files we allow before we start dropping cached operations.

Source

pub fn cache_get_max() -> i32

Get the maximum number of operations we keep in cache.

Source

pub fn cache_get_max_mem() -> u64

Get the maximum amount of tracked memory we allow before we start dropping cached operations.

Source

pub fn cache_get_max_files() -> i32

Get the maximum number of tracked files we allow before we start dropping cached operations.

Source

pub fn cache_get_size() -> i32

Get the current number of operations in cache.

Source

pub fn cache_set_dump(flag: bool)

Handy for debugging. Print the operation cache to stdout just before exit.

Source

pub fn cache_set_trace(flag: bool)

Handy for debugging. Print operation cache actions to stdout as we run

Source

pub fn concurrency_set(max: i32)

set the number of worker threads for vips to operate

Source

pub fn concurrency_get() -> i32

get the number of worker threads that vips is operating

Source

pub fn tracked_get_mem() -> u64

Returns the number of bytes currently allocated via vips_malloc() and friends.

Source

pub fn tracked_get_mem_highwater() -> u64

Returns the largest number of bytes simultaneously allocated via vips_tracked_malloc().

Source

pub fn tracked_get_allocs() -> i32

Returns the number of active allocations.

Source

pub fn tracked_get_files() -> i32

Returns the number of open files.

Source

pub fn pipe_read_limit_set(limit: i64)

If a source does not support mmap or seek and the source is used with a loader that can only work from memory, then the data will be automatically read into memory to EOF before the loader starts.

Source

pub fn shutdown()

Call this to drop caches, close plugins, terminate background threads, and finalize any internal library testing. vips_shutdown() is optional.

Auto Trait Implementations§

§

impl Freeze for Vips

§

impl RefUnwindSafe for Vips

§

impl Send for Vips

§

impl Sync for Vips

§

impl Unpin for Vips

§

impl UnwindSafe for Vips

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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.