pub type ImageSetItem = ImageSetItem<Image, Resolution>;
Expand description
Each of the arguments to image-set()
Aliased Type§
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
impl ImageSetItem
fn parse_type<'i>(p: &mut Parser<'i, '_>) -> Result<OwnedStr, ParseError<'i>>
fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, cors_mode: CorsMode, flags: ParseImageFlags, ) -> Result<Self, ParseError<'i>>
Trait Implementations
Source§impl<Image: Clone, Resolution: Clone> Clone for GenericImageSetItem<Image, Resolution>
impl<Image: Clone, Resolution: Clone> Clone for GenericImageSetItem<Image, Resolution>
Source§fn clone(&self) -> GenericImageSetItem<Image, Resolution>
fn clone(&self) -> GenericImageSetItem<Image, Resolution>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<Image, Resolution> MallocSizeOf for GenericImageSetItem<Image, Resolution>where
Image: MallocSizeOf,
Resolution: MallocSizeOf,
impl<Image, Resolution> MallocSizeOf for GenericImageSetItem<Image, Resolution>where
Image: MallocSizeOf,
Resolution: MallocSizeOf,
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl<Image: PartialEq, Resolution: PartialEq> PartialEq for GenericImageSetItem<Image, Resolution>
impl<Image: PartialEq, Resolution: PartialEq> PartialEq for GenericImageSetItem<Image, Resolution>
Source§fn eq(&self, other: &GenericImageSetItem<Image, Resolution>) -> bool
fn eq(&self, other: &GenericImageSetItem<Image, Resolution>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<Image, Resolution> ToComputedValue for GenericImageSetItem<Image, Resolution>where
Image: ToComputedValue,
Resolution: ToComputedValue,
impl<Image, Resolution> ToComputedValue for GenericImageSetItem<Image, Resolution>where
Image: ToComputedValue,
Resolution: ToComputedValue,
Source§type ComputedValue = GenericImageSetItem<<Image as ToComputedValue>::ComputedValue, <Resolution as ToComputedValue>::ComputedValue>
type ComputedValue = GenericImageSetItem<<Image as ToComputedValue>::ComputedValue, <Resolution as ToComputedValue>::ComputedValue>
The computed value type we’re going to be converted to.
Source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
Convert a computed value to specified value form. Read more
Source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context
.Source§impl<Image, Resolution> ToResolvedValue for GenericImageSetItem<Image, Resolution>where
Image: ToResolvedValue,
Resolution: ToResolvedValue,
impl<Image, Resolution> ToResolvedValue for GenericImageSetItem<Image, Resolution>where
Image: ToResolvedValue,
Resolution: ToResolvedValue,
Source§type ResolvedValue = GenericImageSetItem<<Image as ToResolvedValue>::ResolvedValue, <Resolution as ToResolvedValue>::ResolvedValue>
type ResolvedValue = GenericImageSetItem<<Image as ToResolvedValue>::ResolvedValue, <Resolution as ToResolvedValue>::ResolvedValue>
The resolved value type we’re going to be converted to.
Source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
Convert a resolved value to resolved value form.
Source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
Convert a resolved value to a resolved value.