Enum ori_core::LoadedStyleKind
source · pub enum LoadedStyleKind {
Loaded(LoadedStyle),
Inline(Stylesheet),
}
Expand description
A style that can be loaded from a file or be an inline style.
Variants§
Loaded(LoadedStyle)
Inline(Stylesheet)
Implementations§
source§impl LoadedStyleKind
impl LoadedStyleKind
sourcepub fn reload(&mut self) -> Result<bool, StyleLoadError>
pub fn reload(&mut self) -> Result<bool, StyleLoadError>
Reloads the style if the file has been modified.
Returns true if the style was reloaded.
sourcepub fn style(&self) -> &Stylesheet
pub fn style(&self) -> &Stylesheet
Returns the style.
Trait Implementations§
source§impl Clone for LoadedStyleKind
impl Clone for LoadedStyleKind
source§fn clone(&self) -> LoadedStyleKind
fn clone(&self) -> LoadedStyleKind
Returns a copy of the value. Read more
1.0.0 · 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 LoadedStyleKind
impl Debug for LoadedStyleKind
source§impl From<Stylesheet> for LoadedStyleKind
impl From<Stylesheet> for LoadedStyleKind
source§fn from(style: Stylesheet) -> Self
fn from(style: Stylesheet) -> Self
Converts to this type from the input type.
source§impl TryFrom<&Path> for LoadedStyleKind
impl TryFrom<&Path> for LoadedStyleKind
Auto Trait Implementations§
impl !RefUnwindSafe for LoadedStyleKind
impl !Send for LoadedStyleKind
impl !Sync for LoadedStyleKind
impl Unpin for LoadedStyleKind
impl !UnwindSafe for LoadedStyleKind
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Styleable<T> for T
impl<T> Styleable<T> for T
source§fn styled(self) -> Styled<T>
fn styled(self) -> Styled<T>
Converts the
self
into a Styled<Self>
value.source§fn attr_trans(
self,
key: &str,
value: impl Into<StyleAttributeValue>,
transition: impl Into<StyleTransition>
) -> Styled<T>
fn attr_trans( self, key: &str, value: impl Into<StyleAttributeValue>, transition: impl Into<StyleTransition> ) -> Styled<T>
Adds an attribute with a transition.