pub enum StyleThreading {
Parallel,
Sequential,
}Expand description
Strategy for Stylo’s style traversal during resolve.
Two Documents resolving on StyleThreading::Parallel concurrently
share Stylo’s global thread pool and can panic with
already mutably borrowed — see
https://github.com/DioxusLabs/blitz/issues/430. Set
StyleThreading::Sequential on documents that may resolve from a
user thread while another Parallel resolve is in flight.
Variants§
Parallel
Use Stylo’s parallel traversal via its global rayon thread pool.
Fastest for a single document; panics if another Parallel resolve
is in flight on a different thread.
Sequential
Run style traversal sequentially on the calling thread, bypassing the global pool. Safe to use from many user threads concurrently.
Trait Implementations§
Source§impl Clone for StyleThreading
impl Clone for StyleThreading
Source§fn clone(&self) -> StyleThreading
fn clone(&self) -> StyleThreading
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StyleThreading
impl Debug for StyleThreading
Source§impl Default for StyleThreading
impl Default for StyleThreading
Source§fn default() -> StyleThreading
fn default() -> StyleThreading
Returns the “default value” for a type. Read more
Source§impl PartialEq for StyleThreading
impl PartialEq for StyleThreading
Source§fn eq(&self, other: &StyleThreading) -> bool
fn eq(&self, other: &StyleThreading) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for StyleThreading
impl Eq for StyleThreading
impl StructuralPartialEq for StyleThreading
Auto Trait Implementations§
impl Freeze 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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.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 moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert