lib-humus 0.6.0

Helps creating configurable frontends for humans and computers using axum, Tera and toml.
Documentation
// SPDX-FileCopyrightText: 2026 Slatian <baschdel@disroot.org>
//
// SPDX-License-Identifier: AGPL-3.0-or-later

use crate::language::UnicodeLanguageIdentifier;
use crate::templating::HumusFormatIdentifier;

/// Provides context from the query for use in the [crate::HumusEngine].
///
/// Its main job is the provide the requested format
/// and the preferred language so that the Engine knows
/// which output to produce.
///
/// For a default implementation see [TemplateSetting][crate::middleware::TemplateSetting].
pub trait HumusQuerySettings: Clone {
	/// Returns the requested output format.
	fn get_format(&self) -> HumusFormatIdentifier;

	/// Returns the preferred language for the template
	fn get_preferred_language(&self) -> Option<UnicodeLanguageIdentifier>;
}