pub struct ViewConfig {
pub view_path: PathBuf,
pub view_suffix: String,
pub view_depr: String,
pub tpl_begin: String,
pub tpl_end: String,
pub taglib_begin: String,
pub taglib_end: String,
pub default_filter: String,
pub layout_on: bool,
pub layout_name: String,
pub layout_item: String,
pub tpl_var_identify: String,
}Expand description
视图配置(对齐 PHP config/view.php + think\Template 配置)
Fields§
§view_path: PathBuf视图路径(对齐 PHP view_path)
view_suffix: String视图后缀(对齐 PHP view_suffix,默认 ‘html’)
view_depr: String视图分隔符(对齐 PHP view_depr,默认 ‘/’)
tpl_begin: String模板标签开始(对齐 PHP tpl_begin,默认 ‘{’)
tpl_end: String模板标签结束(对齐 PHP tpl_end,默认 ‘}’)
taglib_begin: String标签库开始(对齐 PHP taglib_begin,默认 ‘{’)
taglib_end: String标签库结束(对齐 PHP taglib_end,默认 ‘}’)
default_filter: String默认过滤器(对齐 PHP default_filter,默认 ‘htmlentities’)
layout_on: bool布局开关(对齐 PHP layout_on,默认 false)
layout_name: String布局名称(对齐 PHP layout_name,默认 ‘layout’)
layout_item: String布局替换项(对齐 PHP layout_item,默认 ‘{CONTENT}’)
tpl_var_identify: String变量识别方式(对齐 PHP tpl_var_identify,默认 ‘array’)
Trait Implementations§
Source§impl Clone for ViewConfig
impl Clone for ViewConfig
Source§fn clone(&self) -> ViewConfig
fn clone(&self) -> ViewConfig
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 moreSource§impl Debug for ViewConfig
impl Debug for ViewConfig
Source§impl Default for ViewConfig
impl Default for ViewConfig
Source§fn default() -> ViewConfig
fn default() -> ViewConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ViewConfig
impl RefUnwindSafe for ViewConfig
impl Send for ViewConfig
impl Sync for ViewConfig
impl Unpin for ViewConfig
impl UnsafeUnpin for ViewConfig
impl UnwindSafe for ViewConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.