pub struct ServiceClient {
pub auth_interface: AuthInterface,
pub config_db_interface: ConfigDbInterface,
pub directory_interface: DirectoryInterface,
pub mqtt_interface: MQTTInterface,
pub cmd_esc_interface: CmdEscInterface,
pub root_principle: Option<String>,
pub permission_group: Option<String>,
/* private fields */
}Expand description
Struct to hold the Factory+ service interfaces and service urls.
Fields§
§auth_interface: AuthInterface§config_db_interface: ConfigDbInterface§directory_interface: DirectoryInterface§mqtt_interface: MQTTInterface§cmd_esc_interface: CmdEscInterface§root_principle: Option<String>§permission_group: Option<String>Implementations§
Source§impl ServiceClient
impl ServiceClient
Sourcepub async fn from(
service_username: &str,
service_password: &str,
root_principle: Option<&str>,
permission_group: Option<&str>,
directory_url: &str,
) -> Self
pub async fn from( service_username: &str, service_password: &str, root_principle: Option<&str>, permission_group: Option<&str>, directory_url: &str, ) -> Self
Create a new ServiceClient from the given credentials and urls.
Sourcepub async fn ping(
&self,
service: ServiceType,
) -> Result<PingResponse, FetchError>
pub async fn ping( &self, service: ServiceType, ) -> Result<PingResponse, FetchError>
Pings the given service. If the ping was successful, you should obtain a PingResponse with http::StatusCode::OK.
As a side effect, this function gets a new token for authentication against the given service.
pub async fn fetch( &self, fetch_opts: FetchOpts, ) -> Result<FetchResponse, FetchError>
pub async fn re_auth_service( &self, service: ServiceType, ) -> Result<TokenStruct, FetchError>
pub async fn show_tokens(&self)
Auto Trait Implementations§
impl Freeze for ServiceClient
impl !RefUnwindSafe for ServiceClient
impl Send for ServiceClient
impl Sync for ServiceClient
impl Unpin for ServiceClient
impl UnsafeUnpin for ServiceClient
impl !UnwindSafe for ServiceClient
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