pub struct SfcStyle {
pub body: String,
pub lang: Option<String>,
pub src: Option<String>,
pub src_span: Option<Span>,
pub byte_offset: usize,
}Expand description
An extracted <style> block from a Vue or Svelte SFC.
Fields§
§body: StringThe style body text (CSS / SCSS / Sass / Less / Stylus / PostCSS source).
lang: Option<String>The lang attribute value (scss, sass, less, stylus, postcss, …).
None for plain <style> (CSS).
src: Option<String>External style source path from the src attribute (<style src="./theme.scss">).
src_span: Option<Span>Span of the src attribute value in the full SFC source.
byte_offset: usizeByte offset of the style body within the full SFC source.
Auto Trait Implementations§
impl Freeze for SfcStyle
impl RefUnwindSafe for SfcStyle
impl Send for SfcStyle
impl Sync for SfcStyle
impl Unpin for SfcStyle
impl UnsafeUnpin for SfcStyle
impl UnwindSafe for SfcStyle
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> ⓘ
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 more