Crates.io | ta-common |
lib.rs | ta-common |
version | 0.1.3 |
source | src |
created_at | 2020-11-16 07:26:32.440481 |
updated_at | 2020-11-30 14:18:23.159415 |
description | Common traits and models for technical indicators |
homepage | https://github.com/immortalinfidel/ta-common |
repository | https://github.com/immortalinfidel/ta-common.git |
max_upload_size | |
id | 312807 |
size | 9,486 |
Common Traits For Technical Indicators
use ta_common::fixed_queue::FixedQueue;
let mut queue=FixedQueue::<i32>::new(2);
queue.add(2);
assert_eq!(1,queue.size());
queue.add(3);
assert_eq!(true,queue.is_full());
queue.add(4);
assert_eq!(2,queue.size());
queue.clear();
assert_eq!(0,queue.size());