pub type ImageSet = ImageSet<Image, Resolution>;
Expand description
image-set()
Aliased Type§
struct ImageSet {
pub selected_index: usize,
pub items: OwnedSlice<GenericImageSetItem<GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<Length>, NonNegative<LengthPercentage>, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, Angle, AngleOrPercentage, Color>, CssUrl, Color, Percentage, Resolution>, Resolution>>,
}
Fields§
§selected_index: usize
The index of the selected candidate. usize::MAX for specified values or invalid images.
items: OwnedSlice<GenericImageSetItem<GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<Length>, NonNegative<LengthPercentage>, GenericPosition<PositionComponent<HorizontalPositionKeyword>, PositionComponent<VerticalPositionKeyword>>, Angle, AngleOrPercentage, Color>, CssUrl, Color, Percentage, Resolution>, Resolution>>
All of the image and resolution pairs.
Implementations§
source§impl ImageSet
impl ImageSet
fn parse<'i, 't>( context: &ParserContext<'_>, input: &mut Parser<'i, 't>, cors_mode: CorsMode, flags: ParseImageFlags, ) -> Result<Self, ParseError<'i>>
Trait Implementations§
source§impl ToComputedValue for ImageSet
impl ToComputedValue for ImageSet
§type ComputedValue = GenericImageSet<GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>, GenericPosition<LengthPercentage, LengthPercentage>, Angle, AngleOrPercentage, GenericColor<Percentage>>, ComputedUrl, GenericColor<Percentage>, Percentage, Resolution>, Resolution>
type ComputedValue = GenericImageSet<GenericImage<GenericGradient<LineDirection, LengthPercentage, NonNegative<CSSPixelLength>, NonNegative<LengthPercentage>, GenericPosition<LengthPercentage, LengthPercentage>, Angle, AngleOrPercentage, GenericColor<Percentage>>, ComputedUrl, GenericColor<Percentage>, Percentage, Resolution>, Resolution>
The computed value type we’re going to be converted to.
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§fn from_computed_value(computed: &Self::ComputedValue) -> Self
fn from_computed_value(computed: &Self::ComputedValue) -> Self
Convert a computed value to specified value form. Read more