Skip to main content

Module prelude

Module prelude 

Source
Expand description

Group imports of many common traits and types by adding a glob import for use by clients of this library.

Structs§

About
Structure containing information about an LRS, including supported extensions and xAPI version(s).
Account
Structure sometimes used by Agents and Groups to identify them.
AccountBuilder
A Type that knows how to construct an Account.
Activity
Structure making up “this” in “I did this”; it is something with which an Actor interacted. It can be a unit of instruction, experience, or performance that is to be tracked in meaningful combination with a Verb.
ActivityBuilder
A Type that knows how to construct an Activity.
ActivityDefinition
Structure that provides additional information (metadata) related to an Activity.
ActivityDefinitionBuilder
A Type that knows how to construct an ActivityDefinition
Agent
Structure that provides combined information about an individual derived from an outside service, such as a Directory Service.
AgentBuilder
A Type that knows how to construct an Agent.
Attachment
Structure representing an important piece of data that is part of a Learning Record. Could be an essay, a video, etc…
AttachmentBuilder
A Type that knows how to construct an Attachment.
CIString
A Type that effectively wraps a UniCase type to allow + facilitate using case-insensitive strings including serializing and deserializing them to/from JSON.
Context
Structure that gives a Statement more meaning like a team the Actor is working with, or the altitude at which a scenario was attempted in a flight simulator exercise.
ContextActivities
Map of types of learning activity context that a Statement is related to, represented as a structure (rather than the usual map).
ContextActivitiesBuilder
A Type that knows how to construct a ContextActivities.
ContextAgent
Structure for capturing a relationship between a Statement and one or more Agent(s) –besides the Actor– in order to properly describe an experience.
ContextAgentBuilder
A Type that knows how to construct a ContextAgent.
ContextBuilder
A Type that knows how to construct a Context.
ContextGroup
Similar to ContextAgent this structure captures a relationship between a Statement and one or more Group(s) –besides the Actor– in order to properly describe an experience.
ContextGroupBuilder
A Type that knows how to construct a ContextGroup.
Extensions
Extensions are available as part of Activity Definitions, as part of a Statement’s context or result properties. In each case, they’re intended to provide a natural way to extend those properties for some specialized use.
Format
Structure that combines a Statement resource GET request format parameter along w/ the request’s Accept-Language, potentially empty, list of user-preferred language-tags, in descending order of preference. This is provided to facilitate reducing types to their canonical form when required by higher layer APIs.
Group
Structure that represents a group of Agents.
GroupBuilder
A Type that knows how to construct a Group.
InteractionComponent
Depending on the value of the interactionType property of an ActivityDefinition, an Activity can provide additional properties, each potentially being a list of InteractionComponents.
InteractionComponentBuilder
A Type that knows how to construct an InteractionComponent.
LanguageMap
A dictionary where the key is an RFC 5646 Language Tag, and the value is a string in the language indicated by the tag. This map is supposed to be populated as fully as possible.
MyDuration
Implementation of time duration that wraps Duration to better satisfy the requirements of the xAPI specifications.
MyEmailAddress
Implementation of Email-Address that wraps EmailAddress to better satisfy the requirements of xAPI while reducing the verbosity making the mandatory mailto: scheme prefix optional.
MyLanguageTag
A wrapper around LanguageTag to use it when Option<T>, serialization and deserialization are needed.
MyTimestamp
Own structure to enforce xAPI requirements for timestamps.
MyVersion
Type for serializing/deserializing xAPI Version strings w/ relaxed parsing rules to allow missing ‘patch’ or even ‘minor’ numbers.
Person
Structure used in response to a GET` Agents Resource request. It provides aggregated information about one Agent.
PersonBuilder
A Type that knows how to construct a Person.
Score
Structure capturing the outcome of a graded Activity achieved by an Actor.
ScoreBuilder
A Type that knows how to construct a Score.
Statement
Structure showing evidence of any sort of experience or event to be tracked in xAPI as a Learning Record.
StatementBuilder
A Type that knows how to construct Statement.
StatementIDs
A structure consisting of an array of Statement Identifiers (UUIDs) an LRS may return as part of a response to certain requests.
StatementRef
Structure containing the UUID (Universally Unique Identifier) of a Statement referenced as the object of another.
StatementRefBuilder
A Type that knows how to construct a StatementRef.
StatementResult
Structure that contains zero, one, or more Statements.
StatementResultId
A doppelgänger structure, similar to that of [StatementId], that abides by the ‘ids’ format rules, but this time for StatementResult.
SubStatement
Alternative representation of a Statement when referenced as the object of another.
SubStatementBuilder
A Type that knows how to construct a SubStatement.
Verb
Structure consisting of an IRI (Internationalized Resource Identifier) and a set of labels corresponding to multiple languages or dialects which provide human-readable meanings of the Verb.
VerbBuilder
A Builder that knows how to construct a Verb.
XResult
Structure capturing a quantifiable xAPI outcome.
XResultBuilder
A Type that knows how to construct an xAPI Result.

Enums§

Actor
Representation of an individual (Agent) or group (Group) (a) referenced in a Statement involved in an action within an Activity or (b) is the authority asserting the truthfulness of Statements.
DataError
Enumeration of different error types raised from this library.
FormatParam
Possible variants for format used to represent the StatementResult desired response to a GET Statement resource.
InteractionType
Enumeration used in ActivityDefinitions.
ObjectType
Objects (Activity, Agent, Group, StatementRef, etc…) in xAPI vary widely in use and can share similar properties making it hard, and sometimes impossible, to know or decide which type is meant except for the presence of a variant of this enumeration in those objects’ JSON representation.
StatementObject
Enumeration representing the subject (or target) of an action (a Verb) carried out by an Actor (an Agent or a Group) captured in a Statement.
StatementType
Enumeration to allow distinguishing between different kinds of a statement collection result returned by xAPI servers.
SubStatementObject
Enumeration for a potential Object of a Statement itself being the Object of another; i.e. the designated variant here is the Object of the Statement referenced in a sub-statement variant.
ValidationError
An error that denotes a validation constraint violation.
Vocabulary
Enumeration of ADL Verbs referenced in xAPI.

Constants§

EMPTY_EXTENSIONS
The empty Extensions singleton.
EMPTY_LANGUAGE_MAP
The empty LanguageMap singleton.
SIGNATURE_CT
Mandated ‘contentType’ to use when an Attachment is a JWS signature.
SIGNATURE_UT
Mandated ‘usageTpe’ to use when an Attachment is a JWS signature.

Traits§

Canonical
Trait implemented by types that can produce a canonical form of their instances.
Fingerprint
To assert Equivalence of two instances of an xAPI Data Type we rely on this Trait to help us compute a fingerprint for each instance. The computation of this fingerprint uses a recursive descent mechanism not unlike what the standard Hash does.
MultiLingual
xAPI refers to a Language Map as a dictionary of words or sentences keyed by the RFC 5646: “Tags for Identifying Languages”.
Validate
xAPI mandates certain constraints on the values of some properties of types it defines. Our API binding structures however limit the Rust type of almost all fields to be Strings or derivative types based on Strings. This is to allow deserializing all types from the wire even when their values violate those constraints.

Functions§

adl_verb
Return a Verb identified by its Vocabulary variant.
fingerprint_it
Compute and return a fingerprint value uniquely identifying the implementing Data Type’s immutable properties.