[][src]Struct imgix::source_set::SourceSet

pub struct SourceSet { /* fields omitted */ }

Primary structure used to represent source sets.

A source set is an ordered set of zero or more image sources and a source size.

A srcset, or "source set", attribute consists of one or more image candidate strings, each separated from the next by a U+002C COMMA character (,).

Each image candidate string consists of zero or more ASCII whitespace, a valid non-empty URL, zero or more ASCII whitespace, and zero or one of the following:

  • A width descriptor, or
  • A pixel density descriptor

For a more detailed explanation see the Srcset attributes specification.


impl SourceSet[src]

pub fn new() -> Self[src]

pub fn scheme(self, s: Scheme) -> Self[src]

pub fn domain(self, d: &str) -> Self[src]

pub fn path(self, p: &str) -> Self[src]

pub fn params(self, params: &'static [(&'static str, &'static str)]) -> Self[src]

pub fn ratios(self, ratios: &'static [u32; 5]) -> Self[src]

pub fn get_ratios(&self) -> &[u32; 5][src]

pub fn targets(self, targets: &'static [u32]) -> Self[src]

pub fn get_targets(&self) -> &[u32][src]

pub fn variable_quality(self, state: bool) -> Self[src]

pub fn uses_variable_quality(&self) -> bool[src]

pub fn qualities(self, qualities: &'static [u32; 5]) -> Self[src]

pub fn get_qualities(&self) -> &[u32][src]

pub fn srcset_attr(&self) -> String[src]

Trait Implementations

impl Debug for SourceSet[src]

impl Default for SourceSet[src]

impl From<Url> for SourceSet[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.