pub struct OfficeConvertClient { /* private fields */ }
Implementations§
Source§impl OfficeConvertClient
impl OfficeConvertClient
Sourcepub fn new<T>(host: T) -> Result<Self, CreateError>
pub fn new<T>(host: T) -> Result<Self, CreateError>
Creates a new office convert client using the default options
§Arguments
host
- The host where the server is located
Sourcepub fn new_with_options<T>(
host: T,
options: ClientOptions,
) -> Result<Self, CreateError>
pub fn new_with_options<T>( host: T, options: ClientOptions, ) -> Result<Self, CreateError>
Creates a new office convert client using the provided options
§Arguments
host
- The host where the server is locatedoptions
- The configuration options for the client
Sourcepub fn from_client<T>(host: T, client: Client) -> Self
pub fn from_client<T>(host: T, client: Client) -> Self
Create an office convert client from an existing reqwest::Client if your setup is more advanced than the default configuration
§Arguments
host
- The host where the server is locatedclient
- The request HTTP client to use
Sourcepub async fn get_status(&self) -> Result<StatusResponse, RequestError>
pub async fn get_status(&self) -> Result<StatusResponse, RequestError>
Obtains the current status of the converter server
Sourcepub async fn get_office_version(&self) -> Result<VersionResponse, RequestError>
pub async fn get_office_version(&self) -> Result<VersionResponse, RequestError>
Obtains the LibreOffice version that the server is using
Sourcepub async fn get_supported_formats(
&self,
) -> Result<Vec<SupportedFormat>, RequestError>
pub async fn get_supported_formats( &self, ) -> Result<Vec<SupportedFormat>, RequestError>
Obtains the list of supported file formats from the server, will give back an error if the version of LibreOffice does not support querying the available file types
Sourcepub async fn is_busy(&self) -> Result<bool, RequestError>
pub async fn is_busy(&self) -> Result<bool, RequestError>
Gets the current busy status of the convert server
Sourcepub async fn collect_garbage(&self) -> Result<(), RequestError>
pub async fn collect_garbage(&self) -> Result<(), RequestError>
Tells the converter server to collect garbage
pub async fn convert(&self, file: Bytes) -> Result<Bytes, RequestError>
Trait Implementations§
Source§impl Clone for OfficeConvertClient
impl Clone for OfficeConvertClient
Source§fn clone(&self) -> OfficeConvertClient
fn clone(&self) -> OfficeConvertClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for OfficeConvertClient
impl !RefUnwindSafe for OfficeConvertClient
impl Send for OfficeConvertClient
impl Sync for OfficeConvertClient
impl Unpin for OfficeConvertClient
impl !UnwindSafe for OfficeConvertClient
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