pub struct Client { /* private fields */ }
Implementations§
Source§impl Client
impl Client
pub async fn stream_updates(&self, since: u64) -> Result<UpdateStream>
Source§impl Client
impl Client
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Creates a new client builder
Sourcepub fn new<S1: ToString, S2: ToString>(endpoint: S1, access_key: S2) -> Self
pub fn new<S1: ToString, S2: ToString>(endpoint: S1, access_key: S2) -> Self
Creates a new PTR Client
Sourcepub async fn get_options(&self) -> Result<OptionsResponse>
pub async fn get_options(&self) -> Result<OptionsResponse>
Returns the options of the PTR
Sourcepub async fn get_metadata(&self, since: u64) -> Result<MetadataResponse>
pub async fn get_metadata(&self, since: u64) -> Result<MetadataResponse>
Returns information about all available updates since the given ID and when the next check for updates should be made
Sourcepub async fn get_update<S: AsRef<str> + Debug>(
&self,
update_hash: S,
) -> Result<UpdateResponse>
pub async fn get_update<S: AsRef<str> + Debug>( &self, update_hash: S, ) -> Result<UpdateResponse>
Returns the parsed update file identified by the given hash. The hash can be retrieved by fetching the metadata with [Client::metadata]
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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