pub struct BrowserManager {
backend: Arc<dyn BrowserBackend>,
}Expand description
Unified manager for browser-based rendering backends. Abstracts away the specific implementation (Native).
Fields§
§backend: Arc<dyn BrowserBackend>Implementations§
Source§impl BrowserManager
impl BrowserManager
Sourcepub async fn start(pool_size: usize, context_ttl: usize) -> Result<Self>
pub async fn start(pool_size: usize, context_ttl: usize) -> Result<Self>
Launches the preferred browser backend. Prefers Native (headless_chrome) if available.
Sourcepub async fn evaluate(
&self,
diagram_type: &str,
source: &str,
format: &str,
) -> DiagramResult<Vec<u8>>
pub async fn evaluate( &self, diagram_type: &str, source: &str, format: &str, ) -> DiagramResult<Vec<u8>>
Evaluate diagram code inside the preferred browser backend.
Sourcepub async fn get_pool_health(&self) -> Result<Value>
pub async fn get_pool_health(&self) -> Result<Value>
Fetches health information from the active backend.
Trait Implementations§
Source§impl Clone for BrowserManager
impl Clone for BrowserManager
Source§fn clone(&self) -> BrowserManager
fn clone(&self) -> BrowserManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BrowserManager
impl !RefUnwindSafe for BrowserManager
impl Send for BrowserManager
impl Sync for BrowserManager
impl Unpin for BrowserManager
impl !UnwindSafe for BrowserManager
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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