Closed inikulin closed 4 years ago
@RReverser Yep. I have filters living in the LRU-cache built with 'static
scheme and execution context is obviously lives much less.
The 's
parameter in ExecutionContext
is not lifetime of execution context itself, but of the scheme, and scheme should probably live as long as your filters, because they borrow from it.
@RReverser nope: https://github.com/cloudflare/wirefilter/blob/master/engine/src/execution_context.rs#L11-L13 'e
is a common minimal lifetime of Scheme and borrowed field values, i.e. 's: 'e
. But, filter requires execution context to leave as long as Scheme reference in it (which in my case is 'static
).
In other words, currently you can't execute Filter<'static>
using execution context with arbitrary lifetime.
Hey there, are there any plans to release a new version soon? I had the same problem and it is currently solved in master. Thank you!
@RReverser I'm not sure I have cargo publishing rights. May I ask you to do that?
I suppose our team we should have publish perms
I'm pretty sure that it was an intentional restriction to limit accepted lifetimes... but I guess you have reasons to make the change :)