1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
* Magba is licensed under The 3-Clause BSD, see LICENSE.
* Copyright 2025 Sira Pornsiriprasert <code@psira.me>
*/
//! Data structures for grouping and management of magnetic components.
//!
//! This module provides two primary types of collections for both magnetic sources and sensors: **Arrays** and **Assemblies**.
//!
//! # Arrays vs. Assemblies
//!
//! | Feature | Array (`SourceArray`, `ObserverArray`) | Assembly (`SourceAssembly`, `ObserverAssembly`) |
//! |---------|--------------------------------------|-----------------------------------------------|
//! | **Allocation** | Stack-allocated | Heap-allocated |
//! | **Capacity** | Fixed-size (`const N: usize`) | Dynamically-sized (`Vec`) |
//! | **Components** | Uniform type (unless wrapped in an enum like `Magnet`) | Heterogeneous |
//! | **Nesting** | Not supported | Supported (only for `SourceAssembly`) |
//! | **Custom Types** | Not supported | Supported |
//!
//! # Convenience Macros
//!
//! Instead of manually creating collections, you can use the [`sources!`](crate::sources) and [`observers!`](crate::observers) macros.
//! These macros provide a familiar, `vec!`-like syntax to quickly build up arrays and assemblies.
pub use observers;
pub use sources;
use Node;
pub use ObserverArray;
pub use ObserverAssembly;
pub use ObserverComponent;
pub use SourceArray;
pub use SourceAssembly;
pub use SourceComponent;