pub struct FeedTree<T: Serializable> { /* private fields */ }
Expand description
Tree of Collections of only a single type, which impl the Feed trait for added functionality
Implementations
Returns new FeedTree
Name and subtype is the only required metadata.
Arguments
name
- stringsubtype
- string, must match given Serializable type
Example
use calcify::FeedTree;
use calcify::Collection;
let f_col: Collection<f64> = Collection::from(vec![0.0,0.0]);
let mut ftree: FeedTree<f64> = FeedTree::new("Test_Tree","f64");
ftree.add_field("Desc", "This is a FeedTree for testing.");
ftree.add_feed("fcol", f_col);
ftree.write("fcol", 1.0);
ftree.write("fcol", 2.0);
assert_eq!(Collection::from(vec![0.0,0.0,1.0,2.0]),*ftree.get_feed("fcol").unwrap())
Inserts new Collection
Arguments
key
- Hash key, Stringf
- Collection<T: Serializable>
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for FeedTree<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for FeedTree<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more