pub struct ODataApiScriptClient { /* private fields */ }
Expand description
OData API script client.
The OData API script client is the currently preferred method to issue script calls against
FileMaker. If you are unable to utilize the OData API, you can fall back to the
crate::data_api::DataApiScriptClient
.
Implementations§
Source§impl ODataApiScriptClient
impl ODataApiScriptClient
Sourcepub fn new(connection: Connection) -> Self
pub fn new(connection: Connection) -> Self
Creates a new OData API script client.
§Examples
use fm_script_client::Connection;
use fm_script_client::odata_api::ODataApiScriptClient;
let client = ODataApiScriptClient::new(
"https://foo:bar@example.com/example_database".try_into().unwrap(),
);
Trait Implementations§
Source§impl ScriptClient for ODataApiScriptClient
impl ScriptClient for ODataApiScriptClient
Source§fn execute<'life0, 'life1, 'async_trait, T, P>(
&'life0 self,
script_name: &'life1 str,
parameter: Option<P>,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned,
P: 'async_trait + Serialize + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait, T, P>(
&'life0 self,
script_name: &'life1 str,
parameter: Option<P>,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned,
P: 'async_trait + Serialize + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executes a script with an optional parameter. Read more
Source§fn execute_without_parameter<'life0, 'life1, 'async_trait, T>(
&'life0 self,
script_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute_without_parameter<'life0, 'life1, 'async_trait, T>(
&'life0 self,
script_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T, Error>> + Send + 'async_trait>>where
T: 'async_trait + DeserializeOwned,
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Convenience method to execute a script without a parameter.
Auto Trait Implementations§
impl Freeze for ODataApiScriptClient
impl !RefUnwindSafe for ODataApiScriptClient
impl Send for ODataApiScriptClient
impl Sync for ODataApiScriptClient
impl Unpin for ODataApiScriptClient
impl !UnwindSafe for ODataApiScriptClient
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