[][src]Crate gravatar

rust-gravatar is a small Rust library that generates Gravatar image URLs based on the official Gravatar specification.

Example

extern crate gravatar;
use gravatar::{Gravatar, Rating};

let url = Gravatar::new("email@example.com")
    .set_size(Some(150))
    .set_rating(Some(Rating::Pg))
    .image_url();
assert_eq!(
    url.as_str(),
    "https://secure.gravatar.com/avatar/5658ffccee7f0ebfda2b226238b1eb6e?s=150&r=pg"
);

Structs

Gravatar

Representation of a single Gravatar image URL.

Enums

Default

The default image to display if the user's email does not have a Gravatar.

Rating

The maximum rating level for which Gravatar will show the user's image instead of the specified default.