pub struct Script { /* private fields */ }Expand description
Wherever scripting is supported in the OpenSearch 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/opensearch/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<'de> Deserialize<'de> for Script
impl<'de> Deserialize<'de> for Script
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Script
Source§impl From<Script> for ScriptField
impl From<Script> for ScriptField
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 UnsafeUnpin 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