pub struct Script { /* private fields */ }
Expand description
Wherever scripting is supported in the Elasticsearch APIs, the syntax follows the same pattern; you specify the language of your script, provide the script logic (or source, and add parameters that are passed into the script.
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-using.html
Implementations
sourceimpl Script
impl Script
sourcepub fn lang<S>(self, lang: S) -> Self where
S: Into<ScriptLang>,
pub fn lang<S>(self, lang: S) -> Self where
S: Into<ScriptLang>,
Specifies the language the script is written in. Defaults to painless
.
sourcepub fn param<T, S>(self, name: S, param: T) -> Self where
S: ToString,
T: Serialize,
pub fn param<T, S>(self, name: S, param: T) -> Self where
S: ToString,
T: Serialize,
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
Trait Implementations
impl StructuralPartialEq for Script
Auto Trait Implementations
impl RefUnwindSafe for Script
impl Send for Script
impl Sync for Script
impl Unpin for Script
impl UnwindSafe for Script
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more