Skip to main content

URLImage

Trait URLImage 

Source
pub trait URLImage {
    // Required method
    fn url(&self) -> &str;
}
Expand description

Types that can provide a URL string for CSS background-image.

Required Methods§

Source

fn url(&self) -> &str

Returns the URL or path used in background-image: url(...).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl URLImage for JPEGImage

Source§

fn url(&self) -> &str

Source§

impl URLImage for PNGImage

Source§

fn url(&self) -> &str

Source§

impl URLImage for SVGImage

Source§

fn url(&self) -> &str

Implementors§