Skip to main content

Crate open_timeline_core

Crate open_timeline_core 

Source
Expand description

Part of the wider OpenTimeline project

This crate defines the basic datatypes used across the OpenTimeline project (web API, desktop application, renderer).

This crate is designed to be used by the rest of the OpenTimeline project, as well as by other 3rd party projects that want to interact with OpenTimeline (e.g. via it’s JSON web API).

This crate aims to provide APIs for each type so that if a type is instantiated, the developer can be sure it’s valid.

Structs§

Date
The OpenTimeline date type
Day
The OpenTimeline day type
Entity
The OpenTimeline Entity type
Month
The OpenTimeline month type
Name
The OpenTimeline Name type. The value can be any string apart from one which when trimmed of trailing and leading whitespace is empty.
OpenTimelineId
The OpenTimeline ID type is a UUIDv4
RawEndDate
Used only by the custom deserialiser (to make it simpler)
ReducedEntities
Container for a set of ReducedEntitys
ReducedEntity
The reduced entity type - holds only the OpenTimelineId and Name of the full type
ReducedTimeline
The reduced entity type - holds only the OpenTimelineId and Name of the full type
ReducedTimelines
Container for a set of ReducedTimelines
TimelineEdit
Represents the information needed for creating and updating a timeline
TimelineView
Holds the information needed to draw a timeline
Year
The OpenTimeline year type

Enums§

DateError
Errors that can arise in relation to a Date
EntityError
Errors that can arise in relation to an Entity
NameError
Errors that can arise in relation to a Name
OpenTimelineError
Errors that can be returned by OpenTimeline

Constants§

MAX_YEAR
The maximum year allowed in the OpenTimeline system
MIN_YEAR
The minimum year allowed in the OpenTimeline system

Traits§

HasIdAndName
Mark that a type has both an OpenTimelineId and a Name, and setup getters and setters for both
IsReducedCollection
Implementing types are collections of “reduced” types
IsReducedType
Implementing types are “reduced” types - they hold the ID and name of the full type, but nothing else