Crate enso_shapely[][src]

Re-exports

pub use generator::GeneratingIterator;

Modules

cartesian
generator

Helper code meant to be used by the code generated through usage of macros from enso-shapely-macros crate.

shared
singleton

This module defines helpers for defining singletons and associated enum types. A singleton is a type with one possible value. It is used mainly for a type level programming purposes.

Macros

_angles_to_brackets_shallow
_cartesian_impl

Internal helper for cartesian macro.

_normalize_input
angles_to_brackets_shallow
cartesian

Computes a cartesian product of the provided input.

define_singleton_enum

Defines singletons and an associated enum type. It expands to the same as define_singletons and define_singleton_enum_from.

define_singleton_enum_from

Defines an associated enum type for predefined singletons.

define_singletons

Defines singleton types. For the following input:

derive_clone_plus
newtype_prim

Generates a newtype wrapper for the provided types. It also generates a lot of impls, including Copy, Clone, Debug, Default, Display, From, Into, Deref, and DerefMut.

newtype_prim_no_default

The same as newtype_prim but does not generate Default derive clause.

newtype_prim_no_default_no_display

The same as newtype_prim but does not generate Default and [Display] derive clauses.

newtype_prim_no_derives

The same as newtype_prim but does not generate derive clauses.

normalize_input
replace

Replaces the first argument with the second one. It is useful when creating macros which match a pattern and you want to generate as many repetitions of a token as there was matches. For example, when matching $($name:ident)*, you may want to generate as many empty tuples as the number of names matched. You can do it by using $(replace!{$name,()})*.

shared

This module implements the shared macro, an utility allowing for easy definition of Rc<RefCell<...>> wrappers. This macro provides an easy way to define secure Rc<RefCell<...>> wrappers for a given struct.

shared_bracket
shared_bracket_fn
shared_bracket_impl
shared_bracket_normalized
shared_struct

Attribute Macros

overlappable

Derive Macros

CloneRef

Derives CloneRef implementation for given type. It performs clone_ref on every member field. The input type must implement Clone and its every field must implement CloneRef.

Iterator

For struct Foo<T> or enum Foo<T> provides:

IteratorMut

Same as derive(Iterator) but generates mutable iterator.