[][src]Struct rsvg_internals::LoadOptions

pub struct LoadOptions {
    pub base_url: Option<Url>,
    pub unlimited_size: bool,
    pub keep_image_data: bool,

Loading options for SVG documents.


base_url: Option<Url>

Base URL; all relative references will be resolved with respect to this.

unlimited_size: bool

Whether to turn off size limits in libxml2.

keep_image_data: bool

Whether to keep original (undecoded) image data to embed in Cairo PDF surfaces.


impl LoadOptions[src]

pub fn new(base_url: Option<Url>) -> Self[src]

Creates a LoadOptions with defaults, and sets the base_url.

pub fn with_unlimited_size(self, unlimited: bool) -> Self[src]

Sets whether libxml2's limits on memory usage should be turned off.

This should only be done for trusted data.

pub fn keep_image_data(self, keep: bool) -> Self[src]

Sets whether to keep the original compressed image data from referenced JPEG/PNG images.

This is only useful for rendering to Cairo PDF surfaces, which can embed the original, compressed image data instead of uncompressed RGB buffers.

pub fn copy_with_base_url(&self, base_url: &AllowedUrl) -> Self[src]

Creates a new LoadOptions with a different base_url.

This is used when loading a referenced file that may in turn cause other files to be loaded, for example <image xlink:href="subimage.svg"/>

Trait Implementations

impl Clone for LoadOptions[src]

Auto Trait Implementations

impl RefUnwindSafe for LoadOptions

impl Send for LoadOptions

impl Sync for LoadOptions

impl Unpin for LoadOptions

impl UnwindSafe for LoadOptions

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,