use crate::error::CustomError; use crate::intermediate::util::coalesce_whitespace; use super::registry::Registry; #[derive(Debug, Clone)] pub(crate) struct ITarget { pub(crate) id: String, value: String, } impl ITarget { pub(crate) async fn new<'b, 'parse>( registry: &'b mut Registry<'parse>, target: &'b organic::types::Target<'parse>, ) -> Result { let id = registry.get_target(target.value); Ok(ITarget { id: id.clone(), value: target.value.to_owned(), }) } }