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
sourceimpl States
impl States
sourcepub fn both_defined(&self) -> bool
pub fn both_defined(&self) -> bool
Checks if both request state and build state are defined.
sourcepub fn get_defined(&self) -> Result<Option<String>, ServeError>
pub fn get_defined(&self) -> Result<Option<String>, ServeError>
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
Auto Trait Implementations
impl RefUnwindSafe for States
impl Send for States
impl Sync for States
impl Unpin for States
impl UnwindSafe for States
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more