pub struct SchedulerRestClient {
api_token: Option<String>,
admin_token: Option<String>,
address: String,
}
Fields§
§api_token: Option<String>
§admin_token: Option<String>
§address: String
Implementations§
source§impl SchedulerRestClient
impl SchedulerRestClient
pub fn new_with_api_token(token: String, address: String) -> Self
pub fn new_with_admin_token(token: String, address: String) -> Self
pub fn new_no_tokens(address: String) -> Self
pub fn new( api_token: Option<String>, admin_token: Option<String>, address: String ) -> Self
pub fn address(&self) -> &String
pub fn path<S: Into<String>>(&self, path: S) -> String
pub fn get<S: Into<String>>(&self, local_path: S) -> Result<String, Error>
pub fn set_header(&self, request_builder: RequestBuilder) -> RequestBuilder
pub fn list_files(&self) -> Result<FolderDump, Error>
pub fn download<S: Into<String>, P: AsRef<Path>>( &self, sub_location: S, output: P ) -> Result<(), Error>
pub fn job_new<Request: Serialize>( &self, request: Request ) -> Result<String, Error>
pub fn job_status<S: Into<String>, State: DeserializeOwned>( &self, id: S ) -> Result<State, Error>
pub fn is_up(&self) -> bool
pub fn api_token(&self) -> &Option<String>
pub fn admin_token(&self) -> &Option<String>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for SchedulerRestClient
impl Send for SchedulerRestClient
impl Sync for SchedulerRestClient
impl Unpin for SchedulerRestClient
impl UnwindSafe for SchedulerRestClient
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