pub enum TemplateGenerationMode {
Inline,
RenderFn,
}Expand description
Mode with which the template is attached to the exported SFC object.
Variants§
Inline
Applies the transformation as if the template is rendered inline
and variables are directly accessible in the function scope.
For example, if there is const foo = ref(0), then foo will be transformed to foo.value.
Non-ref bindings and literal constants will remain untouched.
RenderFn
Applies the transformation as if the template is inside a
function render(_ctx, _cache, $props, $setup, $data, $options).
Variable access will be translated to object property access,
e.g. const foo = ref(0) and foo.bar -> $setup.foo.bar.
Trait Implementations§
Source§impl Debug for TemplateGenerationMode
impl Debug for TemplateGenerationMode
Source§impl Default for TemplateGenerationMode
impl Default for TemplateGenerationMode
Source§fn default() -> TemplateGenerationMode
fn default() -> TemplateGenerationMode
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TemplateGenerationMode
impl RefUnwindSafe for TemplateGenerationMode
impl Send for TemplateGenerationMode
impl Sync for TemplateGenerationMode
impl Unpin for TemplateGenerationMode
impl UnwindSafe for TemplateGenerationMode
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