28 lines
695 B
Rust
28 lines
695 B
Rust
use super::macros::intermediate;
|
|
use crate::error::CustomError;
|
|
use organic::types::StandardProperties;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub(crate) struct ITarget {
|
|
pub(crate) id: String,
|
|
#[allow(dead_code)]
|
|
value: String,
|
|
pub(crate) post_blank: organic::types::PostBlank,
|
|
}
|
|
|
|
intermediate!(
|
|
ITarget,
|
|
&'orig organic::types::Target<'parse>,
|
|
original,
|
|
intermediate_context,
|
|
{
|
|
let mut registry = intermediate_context.registry.lock().unwrap();
|
|
let id = registry.get_target(original.value);
|
|
Ok(ITarget {
|
|
id: id.clone(),
|
|
value: original.value.to_owned(),
|
|
post_blank: original.get_post_blank(),
|
|
})
|
|
}
|
|
);
|