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
use crate::data::base_data::*;
use crate::RemovableValue;
use crate::UrlData;
use ndarray::ArrayBase;
use serde::Serialize;
impl<A, D, S> From<ArrayBase<S, D>> for UrlData
where
    A: Serialize,
    D: ndarray::Dimension,
    S: ndarray::Data<Elem = A>,
{
    fn from(v: ArrayBase<S, D>) -> Self {
        iter_to_data(v.rows().into_iter())
    }
}

impl<A, D, S> From<ArrayBase<S, D>> for RemovableValue<UrlData>
where
    A: Serialize,
    D: ndarray::Dimension,
    S: ndarray::Data<Elem = A>,
{
    fn from(v: ArrayBase<S, D>) -> Self {
        RemovableValue::Specified(v.into())
    }
}