Struct rofl::ImageMacro [] [src]

pub struct ImageMacro {
    pub template: String,
    pub width: Option<u32>,
    pub height: Option<u32>,
    pub captions: Vec<Caption>,
}

Describes an image macro. Used as an input structure.

Note: If width or height is provided, the result will be resized whilst preserving the original aspect ratio of the template. This means the final size of the image may be smaller than requested.

Fields

Name of the template used by this image macro.

Width of the rendered macro (if it is to be different from the template).

Height of the rendered macro (if it is to be different from the template).

Text captions to render over the template.

Methods

impl ImageMacro
[src]

Whether the image macro includes any text.

Trait Implementations

impl<'de> Deserialize<'de> for ImageMacro
[src]

Deserialize this value from the given Serde deserializer. Read more

impl Default for ImageMacro
[src]

Returns the "default value" for a type. Read more

impl PartialEq<ImageMacro> for ImageMacro
[src]

Check equality with another ImageMacro. This is implemented not to take the order of Captions into account.

This method tests for !=.

impl Debug for ImageMacro
[src]

Formats the value using the given formatter.