MCPcopy Create free account
hub / github.com/emwalker/digraph / new

Method new

backend/src/types.rs:423–435  ·  view source on GitHub ↗
(prefix_format: Option<&str>, starts: Option<Geotime>)

Source from the content-addressed store, hash-verified

421
422impl TimerangePrefix {
423 pub fn new(prefix_format: Option<&str>, starts: Option<Geotime>) -> Self {
424 match prefix_format {
425 Some(format) => match starts {
426 Some(ts) => match format {
427 "START_YEAR" => Self::StartYear(ts),
428 "START_YEAR_MONTH" => Self::StartYearMonth(ts),
429 _ => Self::None(ts),
430 },
431 None => Self::None(Geotime::now()),
432 },
433 None => Self::None(Geotime::now()),
434 }
435 }
436
437 pub fn date_string(&self) -> String {
438 let ts = match self {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected