Enum style::stylesheets::import_rule::ImportSheet
source · pub enum ImportSheet {
Sheet(Arc<Stylesheet>),
Refused,
}
Expand description
A sheet that is held from an import rule.
Variants§
Sheet(Arc<Stylesheet>)
A bonafide stylesheet.
Refused
An @import created with a false
Implementations§
source§impl ImportSheet
impl ImportSheet
sourcepub fn new(sheet: Arc<Stylesheet>) -> Self
pub fn new(sheet: Arc<Stylesheet>) -> Self
Creates a new ImportSheet from a stylesheet.
sourcepub fn new_refused() -> Self
pub fn new_refused() -> Self
Creates a refused ImportSheet for a load that will not happen.
sourcepub fn as_sheet(&self) -> Option<&Arc<Stylesheet>>
pub fn as_sheet(&self) -> Option<&Arc<Stylesheet>>
Returns a reference to the stylesheet in this ImportSheet, if it exists.
sourcepub fn media<'a>(
&'a self,
guard: &'a SharedRwLockReadGuard<'_>,
) -> Option<&'a MediaList>
pub fn media<'a>( &'a self, guard: &'a SharedRwLockReadGuard<'_>, ) -> Option<&'a MediaList>
Returns the media list for this import rule.
sourcepub fn rules<'a>(
&'a self,
guard: &'a SharedRwLockReadGuard<'_>,
) -> &'a [CssRule]
pub fn rules<'a>( &'a self, guard: &'a SharedRwLockReadGuard<'_>, ) -> &'a [CssRule]
Returns the rules for this import rule.
Trait Implementations§
source§impl Debug for ImportSheet
impl Debug for ImportSheet
source§impl DeepCloneWithLock for ImportSheet
impl DeepCloneWithLock for ImportSheet
source§fn deep_clone_with_lock(
&self,
_lock: &SharedRwLock,
_guard: &SharedRwLockReadGuard<'_>,
) -> Self
fn deep_clone_with_lock( &self, _lock: &SharedRwLock, _guard: &SharedRwLockReadGuard<'_>, ) -> Self
Deep clones this object.
Auto Trait Implementations§
impl Freeze for ImportSheet
impl !RefUnwindSafe for ImportSheet
impl Send for ImportSheet
impl Sync for ImportSheet
impl Unpin for ImportSheet
impl !UnwindSafe for ImportSheet
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> 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