pub struct ActixAdminConfiguration {
pub enable_auth: bool,
pub user_is_logged_in: Option<for<'a> fn(&'a Session) -> bool>,
pub user_tenant_ref: Option<for<'a> fn(&'a Session) -> Option<i32>>,
pub login_link: Option<String>,
pub logout_link: Option<String>,
pub file_upload_directory: &'static str,
pub navbar_title: &'static str,
pub base_path: &'static str,
pub custom_css_paths: Option<Vec<String>>,
pub custom_js_paths: Option<Vec<String>>,
pub enable_csrf: bool,
}Fields§
§enable_auth: bool§user_is_logged_in: Option<for<'a> fn(&'a Session) -> bool>§user_tenant_ref: Option<for<'a> fn(&'a Session) -> Option<i32>>§login_link: Option<String>§logout_link: Option<String>§file_upload_directory: &'static str§base_path: &'static str§custom_css_paths: Option<Vec<String>>§custom_js_paths: Option<Vec<String>>§enable_csrf: boolWhen true (default), every state-changing route (POST/DELETE/PUT) is
gated by a CSRF token stored in the actix-session cookie. Templates
automatically wire the token into every HTMX request as the
X-CSRF-Token header, and inject a hidden _csrf input into forms.
Requires an actix-session middleware to be installed. If your admin
deployment is behind a non-cookie-session auth flow and you do not want
this protection (e.g. tests, an isolated intranet), set to false.
Trait Implementations§
Source§impl Clone for ActixAdminConfiguration
impl Clone for ActixAdminConfiguration
Source§fn clone(&self) -> ActixAdminConfiguration
fn clone(&self) -> ActixAdminConfiguration
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 Freeze for ActixAdminConfiguration
impl RefUnwindSafe for ActixAdminConfiguration
impl Send for ActixAdminConfiguration
impl Sync for ActixAdminConfiguration
impl Unpin for ActixAdminConfiguration
impl UnsafeUnpin for ActixAdminConfiguration
impl UnwindSafe for ActixAdminConfiguration
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 more