[][src]Trait fin_model::registry::Registry

pub trait Registry<C: Display, T> {
    fn new() -> Self
    where
        Self: Sized
;
fn name(&self) -> String;
fn acronym(&self) -> String;
fn source(&self) -> String;
fn governing_body(&self) -> String;
fn last_updated(&self) -> Option<Date>;
fn next_publication(&self) -> Option<Date>;
fn get(&self, code: C) -> Option<&T>
    where
        Self: Sized
;
fn get_children(&self, parent_code: C) -> Option<Vec<&T>>
    where
        Self: Sized
; }

A trait to support the lookup of standardized codes.

Required methods

fn new() -> Self where
    Self: Sized

Create a new instance.

fn name(&self) -> String

Name of the classification scheme itself.

fn acronym(&self) -> String

A commonly used acronym for the scheme.

fn source(&self) -> String

Source, either documentation, or data, from which the scheme was compiled.

fn governing_body(&self) -> String

The name of the governing body of the scheme.

fn last_updated(&self) -> Option<Date>

The date, if known, that the scheme was last updated or published.

fn next_publication(&self) -> Option<Date>

The date, if known, that the scheme is expected to be updated.

fn get(&self, code: C) -> Option<&T> where
    Self: Sized

Return a description of the code, or None if not present.

fn get_children(&self, parent_code: C) -> Option<Vec<&T>> where
    Self: Sized

Return a list of child descriptions for the parent code, or None if either no children are found, the parent code is not valid, or the scheme does not support hierarchy.

Loading content...

Implementors

Loading content...