Struct gravatar::Gravatar [] [src]

pub struct Gravatar {
    pub email: String,
    pub size: Option<u16>,
    pub default: Option<Default>,
    pub force_default: bool,
    pub rating: Option<Rating>,
    pub ssl: bool,
}

Representation of a single Gravatar image URL.

Fields

The email of the user whose Gravatar you are trying to get.

The desired image size. If None is provided, then no size is passed to Gravatar, which will then use a default of 80px by 80px. Gravatar will only provide images between 1px and 2048px by size.

For more information, see http://en.gravatar.com/site/implement/images/#size.

Default value: None

The default image to use if the user does not have a Gravatar. If None is provided, then Gravatar returns a blue Gravatar logo. The default image can be either a URL or one of Gravatar's premade defaults.

For more information, see http://en.gravatar.com/site/implement/images/#default-image.

Default value: None

If force_default is set to true, then Gravatar will always return the specified default image, whether or not the user's email exists.

For more information, see http://en.gravatar.com/site/implement/images/#force-default.

Default value: false

The maximum rating level for which Gravatar will show the user's image. If None is provided, then Gravatar will only deliver "G"-rated images by default. If an image is at a higher rating level than the requested one, the default image is returned instead.

For more information, see http://en.gravatar.com/site/implement/images/#rating.

Default value: None

If true, Gravatar's secure URL (https://secure.gravatar.com/avatar/...) is used. Otherwise, the non-SSL website is used instead (http://www.gravatar.com/avatar/...).

Default value: true

Methods

impl Gravatar
[src]

Creates a new Gravatar with the given email and default values for the other parameters.

Returns the image URL of the user's Gravatar with all specified parameters.

Trait Implementations

impl Clone for Gravatar
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Gravatar
[src]

Formats the value using the given formatter.