pub struct SphinxApp {
pub config: BuildConfig,
pub extensions: HashMap<String, SphinxExtension>,
pub env: SphinxEnvironment,
}
Expand description
Sphinx application context for extensions
Fields§
§config: BuildConfig
§extensions: HashMap<String, SphinxExtension>
§env: SphinxEnvironment
Implementations§
Source§impl SphinxApp
impl SphinxApp
Sourcepub fn new(config: BuildConfig) -> Result<Self>
pub fn new(config: BuildConfig) -> Result<Self>
Create a new Sphinx application
Sourcepub fn add_extension(&mut self, extension: SphinxExtension) -> Result<()>
pub fn add_extension(&mut self, extension: SphinxExtension) -> Result<()>
Add an extension to the application
Sourcepub fn get_extension(&self, name: &str) -> Option<&SphinxExtension>
pub fn get_extension(&self, name: &str) -> Option<&SphinxExtension>
Get extension by name
Sourcepub fn has_extension(&self, name: &str) -> bool
pub fn has_extension(&self, name: &str) -> bool
Check if extension is loaded
Auto Trait Implementations§
impl Freeze for SphinxApp
impl RefUnwindSafe for SphinxApp
impl Send for SphinxApp
impl Sync for SphinxApp
impl Unpin for SphinxApp
impl UnwindSafe for SphinxApp
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> 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