pub struct RemoteServerHandler { /* private fields */ }
Expand description
Handler for remote server operations
Implementations§
Source§impl RemoteServerHandler
impl RemoteServerHandler
Sourcepub fn new(client: FilesClient) -> Self
pub fn new(client: FilesClient) -> Self
Create a new remote server handler
Sourcepub async fn list(
&self,
cursor: Option<&str>,
per_page: Option<i64>,
) -> Result<(Vec<RemoteServerEntity>, PaginationInfo)>
pub async fn list( &self, cursor: Option<&str>, per_page: Option<i64>, ) -> Result<(Vec<RemoteServerEntity>, PaginationInfo)>
List remote servers
§Arguments
cursor
- Pagination cursorper_page
- Results per page
§Returns
Tuple of (remote_servers, pagination_info)
§Example
use files_sdk::{FilesClient, RemoteServerHandler};
let client = FilesClient::builder().api_key("key").build()?;
let handler = RemoteServerHandler::new(client);
let (servers, _) = handler.list(None, None).await?;
Sourcepub async fn get(&self, id: i64) -> Result<RemoteServerEntity>
pub async fn get(&self, id: i64) -> Result<RemoteServerEntity>
Sourcepub async fn get_configuration_file(&self, id: i64) -> Result<Value>
pub async fn get_configuration_file(&self, id: i64) -> Result<Value>
Sourcepub async fn create(
&self,
name: &str,
server_type: &str,
hostname: Option<&str>,
username: Option<&str>,
port: Option<i64>,
s3_bucket: Option<&str>,
s3_region: Option<&str>,
) -> Result<RemoteServerEntity>
pub async fn create( &self, name: &str, server_type: &str, hostname: Option<&str>, username: Option<&str>, port: Option<i64>, s3_bucket: Option<&str>, s3_region: Option<&str>, ) -> Result<RemoteServerEntity>
Auto Trait Implementations§
impl Freeze for RemoteServerHandler
impl !RefUnwindSafe for RemoteServerHandler
impl Send for RemoteServerHandler
impl Sync for RemoteServerHandler
impl Unpin for RemoteServerHandler
impl !UnwindSafe for RemoteServerHandler
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