xapi-rs 0.1.22

A conformant LRS implementation of xAPI 2.0.0
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// SPDX-License-Identifier: GPL-3.0-or-later

use crate::MyLanguageTag;

/// Trait implemented by types that can produce a _canonical_ form of their
/// instances.
///
/// Needed to comply w/ xAPI requirement when responding to _Statement_ resource
/// **`GET`** requests.
pub trait Canonical {
    /// Reduce `self` to conform to its canonical format as defined in xAPI
    /// keeping the most appropriate entry given a list of preferred language
    /// tags.
    fn canonicalize(&mut self, language_tags: &[MyLanguageTag]);
}