pub fn new(
        name: String,
        props: Vec<Property>,
        rels: Vec<Relationship>,
        endpoints: EndpointsFilter,
    ) -> Type {
        Type {
            name,
            props,
            rels,
            endpoints,
        }
    }
/// Creates a new Type struct.
///
/// # Arguments
///
/// * name - the name of the type, which will be recorded as the label on a node in the graph
/// back-end
/// * props - a vector of [`Property`] structs describing the properties on the node
/// * rels - a vector of [`Relationship`] structs describing the outgoing relationships from
/// this node type
/// * endpoints - an [`EndpointsFilter`] struct describing which CRUD operations should be
/// generated automatically for this node type.
///
/// [`EndpointsFilter`]: ./struct.EndpointsFilter.html
/// [`Property`]: ./struct.Property.html
/// [`Type`]: ./struct.Type.html
///
/// # Examples
///
/// ```rust
/// # use warpgrapher::engine::config::{Type, Property, EndpointsFilter};
///
/// let t = Type::new(
///     "User".to_string(),
///     vec!(Property::new("name".to_string(), false, "String".to_string(), true, false, None, None),
///          Property::new("role".to_string(), false, "String".to_string(), true, false, None, None)),
///     vec!(),
///     EndpointsFilter::all()
/// );
/// ```
Creates a new Type struct.
Creates a new Type struct .
pub fn new(
        name: String,
        props: Vec<Property>,
        rels: Vec<Relationship>,
        endpoints: EndpointsFilter,
    ) -> Type {
        Type {
            name,
            props,
            rels,
            endpoints,
        }
    }
pub fn new ( name : String , props : Vec < Property > , rels : Vec < Relationship > , endpoints : EndpointsFilter , ) -> Type { Type { name , props , rels , endpoints , } }
Creates a new Type struct.
Creates a new Type struct .
name
String
props
Vec<Property>
rels
Vec<Relationship>
endpoints
EndpointsFilter
name
String
props
Vec<Property>
rels
Vec<Relationship>
endpoints
EndpointsFilter
examples
None
use warpgrapher::engine::config::{type, property, endpointsfilter};
let t = Type::new(
"User".to_string(),
vec!(Property::new("name".to_string(), false, "String".to_string(), true, false, None, None),
Property::new("role".to_string(), false, "String".to_string(), true, false, None, None)),
vec!(),
EndpointsFilter::all()
);
```
let t = Type :: new ( " User " . to_string () vec! ( Property :: new ( " name " . to_string () false " String " . to_string () true false None None ) Property :: new ( " role " . to_string () false " String " . to_string () true false None None )) vec! () EndpointsFilter :: all () ) ; ` ` `