man-roxygen/class_schema.R

# class_schema.R


#' @name Schema-class
#'
#' @title
#' Schema: a class to hold list-like objects' schemas
#'
#' @description
#' A general container holding schemas. A *schema* dictates the structure
#' (component names and prototypes) of a list-like \R object.
#'
#' @section The Schema class:
#' Class `Schema` holds the structure of a dataset (a list-like object in \R).
#' A `Schema` consists of two things: inputs' names and prototypes. This is
#' enough to define what to expect from a list.
#'
#' The `Schema` class is mostly useful in any situation that requires formality:
#' automated applications, APIs, large-scale systems, different teams working
#' in parallel that must share work, etc.
#'
#' @section Using the class:
#' * Create objects of class `Schema` through the constructor function [Schema()].
#' * Validate instances of the class by using [valid_schema()].
#' * Test objects for class `Schema` with introspector function [is_schema()].
#' * Extract slots from instances of the class with functions [inputs()]
#' and [prototypes()].
#' * Set new values to slots with functions [`inputs<-()`][inputs()],
#' and [`prototypes<-()`][prototypes()].
#' * Subset instances of the class by using the `Schema` methods implemented
#' for the operators [`[`][Schema-extractors], [`[[`][Schema-extractors] and
#' [`$`][Schema-extractors].
#' * Methods for class `Schema` are implemented for generic functions
#' [format()], [length()], [names()] and [show()].
#'
#' @family Schema
jeanmathieupotvin/cargo documentation built on Oct. 27, 2020, 5:22 p.m.