pub struct ExtensionBuilder { /* private fields */ }Expand description
Used to build an extension.
Implementations§
Source§impl ExtensionBuilder
impl ExtensionBuilder
Sourcepub fn state<T>(self, state: T) -> Self
pub fn state<T>(self, state: T) -> Self
Add a new state value to the extension if it has not be added already
Sourcepub fn freeze_state(self) -> Self
pub fn freeze_state(self) -> Self
Freeze the extension’s state, preventing the state from changing, allowing for faster reads
Sourcepub const fn allow_no_args(self) -> Self
pub const fn allow_no_args(self) -> Self
Allows the extension to be called without any arguments. Example:
"my_ext" callExtension "my_func"Auto Trait Implementations§
impl !Freeze for ExtensionBuilder
impl !RefUnwindSafe for ExtensionBuilder
impl !Send for ExtensionBuilder
impl !Sync for ExtensionBuilder
impl Unpin for ExtensionBuilder
impl !UnwindSafe for ExtensionBuilder
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