Struct arma_rs::ExtensionBuilder
source · pub struct ExtensionBuilder { /* private fields */ }
Expand description
Used to build an extension.
Implementations§
source§impl ExtensionBuilder
impl ExtensionBuilder
sourcepub fn group<S>(self, name: S, group: Group) -> Selfwhere
S: Into<String>,
pub fn group<S>(self, name: S, group: Group) -> Selfwhere S: Into<String>,
Add a group to the extension.
sourcepub fn state<T>(self, state: T) -> Selfwhere
T: Send + Sync + 'static,
pub fn state<T>(self, state: T) -> Selfwhere T: Send + Sync + 'static,
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 !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