[−][src]Struct imgix::source_set::SourceSet
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.
Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for SourceSet
impl Send for SourceSet
impl Sync for SourceSet
impl Unpin for SourceSet
impl UnwindSafe for SourceSet
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,