25 lines
606 B
Rust
25 lines
606 B
Rust
use super::macros::intermediate;
|
|
use super::registry::Registry;
|
|
use super::IObject;
|
|
use crate::error::CustomError;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub(crate) struct IRegularLink {
|
|
pub(crate) raw_link: String,
|
|
pub(crate) children: Vec<IObject>,
|
|
}
|
|
|
|
intermediate!(IRegularLink, RegularLink, original, registry, {
|
|
let children = {
|
|
let mut ret = Vec::new();
|
|
for obj in original.children.iter() {
|
|
ret.push(IObject::new(registry, obj).await?);
|
|
}
|
|
ret
|
|
};
|
|
Ok(IRegularLink {
|
|
raw_link: original.get_raw_link().into_owned(),
|
|
children,
|
|
})
|
|
});
|