pub struct StyleSourceBorrow<'a>(ArcBorrow<'a, Locked<PropertyDeclarationBlock>>);Expand description
A borrowed version of StyleSource.
This is what we use during selector matching, so that we only need to touch the refcount of the declarations when we actually insert them in the rule tree.
Tuple Fields§
§0: ArcBorrow<'a, Locked<PropertyDeclarationBlock>>Implementations§
Source§impl<'a> StyleSourceBorrow<'a>
impl<'a> StyleSourceBorrow<'a>
Sourcepub fn from_declarations(
decls: ArcBorrow<'a, Locked<PropertyDeclarationBlock>>,
) -> Self
pub fn from_declarations( decls: ArcBorrow<'a, Locked<PropertyDeclarationBlock>>, ) -> Self
Creates a borrowed style source from a borrowed declaration block.
Sourcepub fn to_owned(&self) -> StyleSource
pub fn to_owned(&self) -> StyleSource
Creates an owned style source from this borrow, bumping the refcount.
pub(super) fn key(&self) -> NonNull<()>
Sourcepub fn read<'b>(
&self,
guard: &'b SharedRwLockReadGuard<'_>,
) -> &'b PropertyDeclarationBlockwhere
'a: 'b,
pub fn read<'b>(
&self,
guard: &'b SharedRwLockReadGuard<'_>,
) -> &'b PropertyDeclarationBlockwhere
'a: 'b,
Read the style source guard, and obtain thus read access to the underlying property declaration block.
Trait Implementations§
Source§impl<'a> Clone for StyleSourceBorrow<'a>
impl<'a> Clone for StyleSourceBorrow<'a>
Source§fn clone(&self) -> StyleSourceBorrow<'a>
fn clone(&self) -> StyleSourceBorrow<'a>
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 moreimpl<'a> Copy for StyleSourceBorrow<'a>
Source§impl<'a> Debug for StyleSourceBorrow<'a>
impl<'a> Debug for StyleSourceBorrow<'a>
Source§impl<'a> MallocSizeOf for StyleSourceBorrow<'a>
impl<'a> MallocSizeOf for StyleSourceBorrow<'a>
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for StyleSourceBorrow<'a>
impl<'a> !UnwindSafe for StyleSourceBorrow<'a>
impl<'a> Freeze for StyleSourceBorrow<'a>
impl<'a> Send for StyleSourceBorrow<'a>
impl<'a> Sync for StyleSourceBorrow<'a>
impl<'a> Unpin for StyleSourceBorrow<'a>
impl<'a> UnsafeUnpin for StyleSourceBorrow<'a>
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> 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> ⓘ
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