pub fn rewrite<'h, Source>(
source: Source,
settings: Settings<'h, '_>
) -> (LolFuture<'h, Source>, LolReader)where
Source: AsyncRead,
Expand description
This function is the primary entrypoint for lol-async
. It takes a
data Source
that is [AsyncRead
] and a [Settings
] that describes
the desired rewriting logic. It returns a !Send LolFuture
future
that drives the rewriter on the current thread and a LolReader
that is Send and can be used anywhere an [AsyncRead
] would be
used. The html content yielded by the LolReader
will be rewritten
according to the rules specified in the Settings.