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§
Source§impl Script
impl Script
Sourcepub fn lang<S>(self, lang: S) -> Selfwhere
S: Into<ScriptLang>,
pub fn lang<S>(self, lang: S) -> Selfwhere
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
pub fn param<T, S>(self, name: S, param: T) -> Self
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§
Source§impl From<Script> for ScriptField
impl From<Script> for ScriptField
impl Eq for Script
impl StructuralPartialEq for Script
Auto Trait Implementations§
impl Freeze for Script
impl RefUnwindSafe for Script
impl Send for Script
impl Sync for Script
impl Unpin for Script
impl UnwindSafe for Script
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