natter/src/intermediate/entity.rs

20 lines
439 B
Rust
Raw Normal View History

2023-10-27 21:48:19 +00:00
use crate::error::CustomError;
use super::registry::Registry;
#[derive(Debug)]
2023-10-28 00:27:50 +00:00
pub(crate) struct IEntity {
pub(crate) html: String,
}
2023-10-27 21:48:19 +00:00
impl IEntity {
2023-10-29 16:15:07 +00:00
pub(crate) async fn new<'intermediate, 'parse>(
registry: &mut Registry<'intermediate, 'parse>,
2023-10-27 21:48:19 +00:00
original: &organic::types::Entity<'parse>,
) -> Result<IEntity, CustomError> {
2023-10-28 00:27:50 +00:00
Ok(IEntity {
html: original.html.to_owned(),
})
2023-10-27 21:48:19 +00:00
}
}