pub struct ExtensionBuilder { /* private fields */ }
Expand description

Used to build an extension.

Implementations§

Sets the version of the extension.

Examples found in repository?
examples/hello_world.rs (line 6)
4
5
6
7
8
9
10
fn init() -> Extension {
    Extension::build()
        .version("1.0.0".to_string())
        .command("hello", hello)
        .command("welcome", welcome)
        .finish()
}

Add a group to the extension.

Allows the extension to be called without any arguments. Example:

"my_ext" callExtension "my_func"
``

Add a command to the extension.

Examples found in repository?
examples/hello_world.rs (line 7)
4
5
6
7
8
9
10
fn init() -> Extension {
    Extension::build()
        .version("1.0.0".to_string())
        .command("hello", hello)
        .command("welcome", welcome)
        .finish()
}

Builds the extension.

Examples found in repository?
examples/hello_world.rs (line 9)
4
5
6
7
8
9
10
fn init() -> Extension {
    Extension::build()
        .version("1.0.0".to_string())
        .command("hello", hello)
        .command("welcome", welcome)
        .finish()
}

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.