pub struct Vips;Implementations§
Source§impl Vips
That’s the main type of this crate. Use it to initialize the system
impl Vips
That’s the main type of this crate. Use it to initialize the system
Sourcepub fn progress_set(flag: bool)
pub fn progress_set(flag: bool)
A structure available to eval callbacks giving information on evaluation progress
Sourcepub fn get_disc_threshold() -> u64
pub fn get_disc_threshold() -> u64
Return the number of bytes at which we flip between open via memory and open via disc
Sourcepub fn version_string() -> Result<String>
pub fn version_string() -> Result<String>
Get the VIPS version as a static string, including a build date and time.
Sourcepub fn thread_shutdown()
pub fn thread_shutdown()
Free any thread-private data and flush any profiling information.
Sourcepub fn error_buffer() -> Result<String>
pub fn error_buffer() -> Result<String>
Get a pointer to the start of the error buffer as string
Sourcepub fn error(domain: &str, error: &str) -> Result<()>
pub fn error(domain: &str, error: &str) -> Result<()>
Format the string in the style of printf() and append to the error buffer.
Sourcepub fn error_system(code: i32, domain: &str, error: &str) -> Result<()>
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
Sourcepub fn freeze_error_buffer()
pub fn freeze_error_buffer()
Stop errors being logged. Use [func@error_thaw] to unfreeze
Sourcepub fn error_clear()
pub fn error_clear()
Clear and reset the error buffer.
Sourcepub fn error_thaw()
pub fn error_thaw()
Re-enable error logging.
Sourcepub fn error_exit(error: &str) -> Result<()>
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.
Sourcepub fn cache_print()
pub fn cache_print()
Print the whole operation cache to stdout. Handy for debugging.
Sourcepub fn cache_set_max(max: i32)
pub fn cache_set_max(max: i32)
Set the maximum number of operations we keep in cache.
Sourcepub fn cache_set_max_mem(max: u64)
pub fn cache_set_max_mem(max: u64)
Set the maximum amount of tracked memory we allow before we start dropping cached operations.
Sourcepub fn cache_set_max_files(max: i32)
pub fn cache_set_max_files(max: i32)
Set the maximum number of tracked files we allow before we start dropping cached operations.
Sourcepub fn cache_get_max() -> i32
pub fn cache_get_max() -> i32
Get the maximum number of operations we keep in cache.
Sourcepub fn cache_get_max_mem() -> u64
pub fn cache_get_max_mem() -> u64
Get the maximum amount of tracked memory we allow before we start dropping cached operations.
Sourcepub fn cache_get_max_files() -> i32
pub fn cache_get_max_files() -> i32
Get the maximum number of tracked files we allow before we start dropping cached operations.
Sourcepub fn cache_get_size() -> i32
pub fn cache_get_size() -> i32
Get the current number of operations in cache.
Sourcepub fn cache_set_dump(flag: bool)
pub fn cache_set_dump(flag: bool)
Handy for debugging. Print the operation cache to stdout just before exit.
Sourcepub fn cache_set_trace(flag: bool)
pub fn cache_set_trace(flag: bool)
Handy for debugging. Print operation cache actions to stdout as we run
Sourcepub fn concurrency_set(max: i32)
pub fn concurrency_set(max: i32)
set the number of worker threads for vips to operate
Sourcepub fn concurrency_get() -> i32
pub fn concurrency_get() -> i32
get the number of worker threads that vips is operating
Sourcepub fn tracked_get_mem() -> u64
pub fn tracked_get_mem() -> u64
Returns the number of bytes currently allocated via vips_malloc() and friends.
Sourcepub fn tracked_get_mem_highwater() -> u64
pub fn tracked_get_mem_highwater() -> u64
Returns the largest number of bytes simultaneously allocated via vips_tracked_malloc().
Sourcepub fn tracked_get_allocs() -> i32
pub fn tracked_get_allocs() -> i32
Returns the number of active allocations.
Sourcepub fn tracked_get_files() -> i32
pub fn tracked_get_files() -> i32
Returns the number of open files.
Sourcepub fn pipe_read_limit_set(limit: i64)
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.