Macro julia::jl_type [] [src]

macro_rules! jl_type {
    { type $name:ident = Bits<N> where N: $nbits:expr; } => { ... };
    { type $name:ident = Bits<N> where N: $nbits:expr, Self : $supertype:expr; } => { ... };
    { trait $name:ident; } => { ... };
    { trait $name:ident : $supertype:expr; } => { ... };
    { struct $name:ident; } => { ... };
    { struct $name:ident : $supertype:expr; } => { ... };
    {
        struct $name:ident {
            $(
                $fname:ident : $ftype:expr
            ),*
        }
    } => { ... };
    {
        struct $name:ident {
            $(
                $fname:ident : $ftype:expr,
            )*
        } : $supertype:expr
    } => { ... };
    { mut struct $name:ident; } => { ... };
    { mut struct $name:ident : $supertype:expr; } => { ... };
    {
        mut struct $name:ident {
            $(
                $fname:ident : $ftype:expr,
            )*
        }
    } => { ... };
    {
        mut struct $name:ident {
            $(
                $fname:ident : $ftype:expr,
            )*
        } : $supertype:expr
    } => { ... };
}

Create a new Julia type using a Rust-like syntax.

Syntax

Primitive type

type <name> = Bits<N> where N: <bits> [ , Self: <supertype> ];

Abstract type

trait <name> [ : <supertype> ];

Struct

[mut] struct <name> [ : <supertype> ];

or [mut] struct <name> { ( <fname>: <ftype>, )* } [ : <supertype> ]