pub enum StyleThreading {
Parallel,
Sequential,
}Expand description
Strategy for Stylo’s style traversal during resolve.
Blitz permits at most one parallel traversal at a time through a
process-wide guard. Concurrent Parallel resolves of independent
documents fall back to sequential traversal when the guard is unavailable.
This avoids overlapping parallel traversals borrowing Stylo’s worker-local
caches: https://github.com/DioxusLabs/blitz/issues/430.
Styling must not reenter Stylo on a thread with an active style context. Other users of Stylo’s global pool must coordinate separately.
Variants§
Parallel
Use Stylo’s parallel traversal via its global rayon thread pool when the traversal guard is available. Otherwise run sequentially on the calling thread without waiting for the guard.
Sequential
Run style traversal sequentially on the calling thread, bypassing the global pool. This is the default.
Trait Implementations§
Source§impl Clone for StyleThreading
impl Clone for StyleThreading
impl Copy for StyleThreading
Source§impl Debug for StyleThreading
impl Debug for StyleThreading
Source§impl Default for StyleThreading
impl Default for StyleThreading
impl Eq for StyleThreading
Source§impl PartialEq for StyleThreading
impl PartialEq for StyleThreading
impl StructuralPartialEq for StyleThreading
Auto Trait Implementations§
impl Forget for StyleThreading
impl Freeze for StyleThreading
impl Move for StyleThreading
impl RefUnwindSafe for StyleThreading
impl Send for StyleThreading
impl Sync for StyleThreading
impl Unpin for StyleThreading
impl UnsafeUnpin for StyleThreading
impl UnwindSafe for StyleThreading
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
impl<T> Brush for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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