Type Alias ImageSetItem

Source
pub type ImageSetItem = ImageSetItem<Image, Resolution>;
Expand description

Each of the arguments to image-set()

Aliased Type§

#[repr(C)]
pub struct ImageSetItem { pub image: GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<Length>, NonNegative<LengthPercentage>, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, Angle, AngleOrPercentage, Color>, CssUrl, Color, Percentage, Resolution>, pub resolution: Resolution, pub mime_type: OwnedStr, pub has_mime_type: bool, }

Fields§

§image: GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<Length>, NonNegative<LengthPercentage>, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, Angle, AngleOrPercentage, Color>, CssUrl, Color, Percentage, Resolution>

<image>. <string> is converted to Image::Url at parse time.

§resolution: Resolution

The <resolution>.

TODO: Skip serialization if it is 1x.

§mime_type: OwnedStr

The type(<string>) (Optional) Specify the image’s MIME type

§has_mime_type: bool

True if mime_type has been specified

Implementations§

Source§

impl ImageSetItem

Source

fn parse_type<'i>(p: &mut Parser<'i, '_>) -> Result<OwnedStr, ParseError<'i>>

Source

fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, cors_mode: CorsMode, flags: ParseImageFlags, ) -> Result<Self, ParseError<'i>>