[][src]Struct raystack::SkySparkClient

pub struct SkySparkClient { /* fields omitted */ }

A client for interacting with a SkySpark server.

Methods

impl SkySparkClient[src]

pub async fn new<'_, '_, '_>(
    project_api_url: Url,
    username: &'_ str,
    password: &'_ str,
    timeout_in_seconds: Option<u64>,
    rng: &'_ SystemRandom
) -> Result<Self, NewSkySparkClientError>
[src]

Create a new SkySparkClient.

Example

use raystack::SkySparkClient;
use ring::rand::SystemRandom;
use url::Url;
let rng = SystemRandom::new();
let url = Url::parse("https://skyspark.company.com/api/bigProject/").unwrap();
let client = SkySparkClient::new(url, "username", "p4ssw0rd", None, &rng).await.unwrap();

pub fn project_name(&self) -> &str[src]

Return the project name for this client.

pub fn project_api_url(&self) -> &Url[src]

Return the project API url being used by this client.

impl SkySparkClient[src]

pub async fn about<'_>(&'_ self) -> Result<Grid, Error>[src]

pub async fn formats<'_>(&'_ self) -> Result<Grid, Error>[src]

pub async fn his_read<'_, '_, '_>(
    &'_ self,
    id: &'_ Ref,
    range: &'_ HisReadRange
) -> Result<Grid, Error>
[src]

pub async fn his_write_bool<'_, '_, '_>(
    &'_ self,
    id: &'_ Ref,
    his_data: &'_ [(DateTime<Tz>, bool)]
) -> Result<Grid, Error>
[src]

pub async fn his_write_num<'_, '_, '_, '_>(
    &'_ self,
    id: &'_ Ref,
    his_data: &'_ [(DateTime<Tz>, f64)],
    unit: &'_ str
) -> Result<Grid, Error>
[src]

pub async fn his_write_str<'_, '_, '_>(
    &'_ self,
    id: &'_ Ref,
    his_data: &'_ [(DateTime<Tz>, String)]
) -> Result<Grid, Error>
[src]

pub async fn nav<'_, '_>(
    &'_ self,
    nav_id: Option<&'_ str>
) -> Result<Grid, Error>
[src]

pub async fn ops<'_>(&'_ self) -> Result<Grid, Error>[src]

pub async fn read<'_, '_>(
    &'_ self,
    filter: &'_ str,
    limit: Option<u64>
) -> Result<Grid, Error>
[src]

pub async fn read_by_ids<'_, '_>(
    &'_ self,
    ids: &'_ [Ref]
) -> Result<Grid, Error>
[src]

impl SkySparkClient[src]

pub async fn eval<'_, '_>(&'_ self, axon_expr: &'_ str) -> Result<Grid, Error>[src]

Trait Implementations

impl Debug for SkySparkClient[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]