pub struct PobParser { /* private fields */ }Expand description
Thread-safe handle to a PobHeadless instance running on a dedicated OS thread.
mlua::Lua with LuaJIT is !Send, so we keep it pinned to one thread and
communicate via channels. This handle is Send + Sync and cheap to clone.
Implementations§
Source§impl PobParser
impl PobParser
Sourcepub async fn new(pob_path: &Path) -> Result<Self, Error>
pub async fn new(pob_path: &Path) -> Result<Self, Error>
Spawn the parser thread and initialize PobHeadless.
Awaits until PoB is fully initialized. Returns an error if initialization fails so the server can fail-fast at startup.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PobParser
impl !RefUnwindSafe for PobParser
impl Send for PobParser
impl Sync for PobParser
impl Unpin for PobParser
impl UnsafeUnpin for PobParser
impl !UnwindSafe for PobParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more