pub struct ViewEngine {
pub lang: Option<Arc<LangManager>>,
/* private fields */
}Fields§
§lang: Option<Arc<LangManager>>Implementations§
Source§impl ViewEngine
impl ViewEngine
Sourcepub fn new(lang: Option<Arc<LangManager>>) -> ViewEngine
pub fn new(lang: Option<Arc<LangManager>>) -> ViewEngine
Inisialisasi Native Blade engine dan load semua template dari resources/views
Sourcepub fn render(&self, template_name: &str, context: &BladeContext) -> String
pub fn render(&self, template_name: &str, context: &BladeContext) -> String
Render template dengan context data
Sourcepub fn blade_engine(&self) -> &Arc<BladeEngine> ⓘ
pub fn blade_engine(&self) -> &Arc<BladeEngine> ⓘ
Akses ke internal BladeEngine
Sourcepub async fn render_with_session(
&self,
template_name: &str,
context: BladeContext,
session: &Session,
locale: Option<String>,
) -> String
pub async fn render_with_session( &self, template_name: &str, context: BladeContext, session: &Session, locale: Option<String>, ) -> String
Render template dengan dukungan Session, Flash Messages, dan Validation Errors
Trait Implementations§
Source§impl Clone for ViewEngine
impl Clone for ViewEngine
Source§fn clone(&self) -> ViewEngine
fn clone(&self) -> ViewEngine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Forget for ViewEngine
impl Freeze for ViewEngine
impl Move for ViewEngine
impl RefUnwindSafe for ViewEngine
impl Send for ViewEngine
impl Sync for ViewEngine
impl Unpin for ViewEngine
impl UnsafeUnpin for ViewEngine
impl UnwindSafe for ViewEngine
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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