natter/src/intermediate/entity.rs

20 lines
419 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 18:14:10 +00:00
pub(crate) async fn new<'b, 'parse>(
registry: &'b mut Registry<'parse>,
original: &'b organic::types::Entity<'parse>,
2023-10-27 21:48:19 +00:00
) -> 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
}
}