Struct solnedgang::SunriseSunsetCalculator[][src]

pub struct SunriseSunsetCalculator { /* fields omitted */ }
Expand description

Calculator for determine the sunrise and sunset times.

Implementations

Calculates the the time for the sunrise in minutes from midnight (UTC).

Arguments

  • date - The date for which the sunrise time should be calculated for.

Calculates the the time for the sunset in minutes from midnight (UTC).

Arguments

  • date - The date for which the sunset time should be calculated for.

Trait Implementations

Create a new instance of the SunriseSunsetCalculator class based on the location supplied.

Examples

Create the calculator for Düsseldorf, Germany:

use solnedgang::{SunriseSunsetCalculator, Coordinates};

let duesseldorf = Coordinates::new(51.21794, 6.76165);
let calculator = SunriseSunsetCalculator::from(duesseldorf);

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.