pub enum ImportSheet {
    Sheet(Arc<Stylesheet>),
    Pending,
    Refused,
}Expand description
A sheet that is held from an import rule.
Variants§
Sheet(Arc<Stylesheet>)
A bonafide stylesheet.
Pending
An @import created while parsing off-main-thread, whose Gecko sheet has yet to be created and attached.
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_pending() -> Self
 
pub fn new_pending() -> Self
Creates a pending ImportSheet for a load that has not started yet.
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 rule list 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