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
template: String
Name of the template used by this image macro.
width: Option<u32>
Width of the rendered macro (if it is to be different from the template).
height: Option<u32>
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]
Trait Implementations
impl<'de> Deserialize<'de> for ImageMacro
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Default for ImageMacro
[src]
fn default() -> ImageMacro
Returns the "default value" for a type. Read more
impl PartialEq<ImageMacro> for ImageMacro
[src]
fn eq(&self, other: &Self) -> bool
Check equality with another ImageMacro. This is implemented not to take the order of Captions into account.
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.