Struct DefaultCustom
pub struct DefaultCustom(/* private field */);
The default trait implementation of Custom.
Whenever one uses the formatting or parsing routines in this module without providing a configuration, then this customization is the one that gets used.
The behavior of the locale formatting of this type is meant to match that
of Unicode's und locale.
Example
This example shows how to explicitly use DefaultCustom via strtime
formatting:
use jiff::{civil, fmt::strtime::{BrokenDownTime, DefaultCustom, Config}};
let config = Config::new().custom(DefaultCustom::new());
let dt = civil::date(2025, 7, 1).at(17, 30, 0, 0);
let tm = BrokenDownTime::from(dt);
assert_eq!(
tm.to_string_with_config(&config, "%c")?,
"2025 M07 1, Tue 17:30:00",
);
# Ok::<(), Box<dyn std::error::Error>>(())
Implementations
impl DefaultCustom
const fn new() -> DefaultCustomCreate a new instance of this default customization.
Trait Implementations
impl Clone for DefaultCustom
fn clone(&self) -> Self
impl Custom for DefaultCustom
impl Debug for DefaultCustom
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Default for DefaultCustom
fn default() -> Self