pub trait ContextTrait:
Clone
+ Send
+ Sync
+ 'static {
type Ext: ContextExt<Self>;
// Required methods
fn names_plural(&self) -> impl Iterator<Item = impl AsRef<str>>;
fn editor(&self) -> Option<&EditorConfig>;
fn uploads_dir(&self) -> &Path;
fn ext(&self) -> &Self::Ext;
}
Expand description
Trait implemented by the context available in all endpoints using axum::extract::State
.
Required Associated Types§
type Ext: ContextExt<Self>
Required Methods§
fn names_plural(&self) -> impl Iterator<Item = impl AsRef<str>>
fn editor(&self) -> Option<&EditorConfig>
fn uploads_dir(&self) -> &Path
fn ext(&self) -> &Self::Ext
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.