Function tl::parse_owned[][src]

pub unsafe fn parse_owned<'a>(input: String) -> VDomGuard<'a>

Parses the given input string and returns an owned, RAII guarded DOM

Safety

This uses a lot of unsafe behind the scenes to create a self-referential-like struct. The given input string is first leaked and turned into raw pointer, and its lifetime will be promoted to ’static. Once VDomGuard goes out of scope, the string will be freed. It should not be possible to cause UB in its current form and might become a safe function in the future.