Struct fend_core::Context[][src]

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

This struct contains context used for fend. It should only be created once at startup.

Implementations

Create a new context instance. This can be fairly slow, and should only be done once if possible.

This method currently has no effect!

Set the current time. This API will likely change in the future!

The first argument (ms_since_1970) must be the number of elapsed milliseconds since January 1, 1970 at midnight UTC, ignoring leap seconds in the same way as unix time.

The second argument (tz_offset_secs) is the current time zone offset to UTC, in seconds.

Define the units C and F as coulomb and farad instead of degrees celsius and degrees fahrenheit.

Set a random number generator

Clear the random number generator after setting it with via Self::set_random_u32_fn

Change the output mode fixed-width terminal style. This enables ASCII graphs in the output.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.