pub struct States {
    pub build_state: Option<String>,
    pub request_state: Option<String>,
}
Expand description

Represents all the different states that can be generated for a single template, allowing amalgamation logic to be run with the knowledge of what did what (rather than blindly working on a vector).

Fields

build_state: Option<String>

Any state generated by the build state strategy.

request_state: Option<String>

Any state generated by the request state strategy.

Implementations

Creates a new instance of the states, setting both to None.

Checks if both request state and build state are defined.

Gets the only defined state if only one is defined. If no states are defined, this will just return None. If both are defined, this will return an error.

Trait Implementations

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.