pub struct ArchiverClient { /* private fields */ }Expand description
An Archiver Appliance retrieval service. Cheap to clone; holds no connection state, so it can be shared freely between threads and between several plots.
Implementations§
Source§impl ArchiverClient
impl ArchiverClient
Sourcepub fn new(url: &str) -> Result<Self>
pub fn new(url: &str) -> Result<Self>
From the URL the user gave, e.g. http://host:17668 or
http://host:17668/retrieval/: strips trailing slashes and appends
/retrieval unless it already ends so. Only http and https are
accepted, plus Phoebus’s pbraw:// (the same service over plain
HTTP); a bare host:port gets http://.
pub fn with_timeout_secs(self, secs: u64) -> Self
Sourcepub fn data_url(&self, q: &Query) -> String
pub fn data_url(&self, q: &Query) -> String
getData.json with from/to as YYYY-MM-DDTHH:MM:SS.mmmZ and
every parameter percent-encoded.
Sourcepub fn search_url(&self, s: &Search) -> String
pub fn search_url(&self, s: &Search) -> String
bpl/getMatchingPVs?pv=...&limit=N or ?regex=...&limit=N.
Sourcepub fn metadata_url(&self, pv: &str) -> String
pub fn metadata_url(&self, pv: &str) -> String
bpl/getMetadata?pv=....
Sourcepub fn version_url(&self) -> String
pub fn version_url(&self) -> String
bpl/getVersion: the appliance’s version, a cheap “are you there”.
Source§impl ArchiverClient
impl ArchiverClient
Sourcepub fn get_data(&self, q: &Query) -> Result<Option<TimeSeries>>
pub fn get_data(&self, q: &Query) -> Result<Option<TimeSeries>>
Fetch and decode one PV’s data. Ok(None) when the archiver has no
data in the range (a [ ] response); Err(Http{404}) when the PV is
not archived. Blocking: call from a worker thread.
Trait Implementations§
Source§impl Clone for ArchiverClient
impl Clone for ArchiverClient
Source§fn clone(&self) -> ArchiverClient
fn clone(&self) -> ArchiverClient
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ArchiverClient
impl Debug for ArchiverClient
impl Eq for ArchiverClient
Source§impl PartialEq for ArchiverClient
impl PartialEq for ArchiverClient
impl StructuralPartialEq for ArchiverClient
Auto Trait Implementations§
impl Freeze for ArchiverClient
impl RefUnwindSafe for ArchiverClient
impl Send for ArchiverClient
impl Sync for ArchiverClient
impl Unpin for ArchiverClient
impl UnsafeUnpin for ArchiverClient
impl UnwindSafe for ArchiverClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.