pub struct AsyncUnitsServiceClient<C> { /* private fields */ }Trait Implementations§
Source§impl<C> AsyncService<C> for AsyncUnitsServiceClient<C>
impl<C> AsyncService<C> for AsyncUnitsServiceClient<C>
Source§fn new(client: C, runtime: &Arc<ConjureRuntime>) -> Self
fn new(client: C, runtime: &Arc<ConjureRuntime>) -> Self
Creates a new service wrapping an async HTTP client.
Source§impl<I: Stream<Item = Result<Bytes, Error>>, __C> AsyncUnitsService<I> for AsyncUnitsServiceClient<__C>
impl<I: Stream<Item = Result<Bytes, Error>>, __C> AsyncUnitsService<I> for AsyncUnitsServiceClient<__C>
Source§async fn get_all_units(
&self,
auth_: &BearerToken,
) -> Result<GetUnitsResponse, Error>
async fn get_all_units( &self, auth_: &BearerToken, ) -> Result<GetUnitsResponse, Error>
Returns all known units, grouped by the physical property they measure.
Source§async fn get_unit(
&self,
auth_: &BearerToken,
unit: &UnitSymbol,
) -> Result<Option<Unit>, Error>
async fn get_unit( &self, auth_: &BearerToken, unit: &UnitSymbol, ) -> Result<Option<Unit>, Error>
Returns information for a unit symbol if available. Returns as empty if the provided symbol cannot be parsed.
Source§async fn get_batch_units(
&self,
auth_: &BearerToken,
units: &BTreeSet<UnitSymbol>,
) -> Result<BTreeMap<UnitSymbol, Unit>, Error>
async fn get_batch_units( &self, auth_: &BearerToken, units: &BTreeSet<UnitSymbol>, ) -> Result<BTreeMap<UnitSymbol, Unit>, Error>
Returns information for the unit symbols if available. If the provided symbol cannot be parsed, it will be
omitted from the map.
Source§async fn get_commensurable_units(
&self,
auth_: &BearerToken,
unit: &UnitSymbol,
) -> Result<BTreeSet<Unit>, Error>
async fn get_commensurable_units( &self, auth_: &BearerToken, unit: &UnitSymbol, ) -> Result<BTreeSet<Unit>, Error>
Returns the set of cataloged units that can be converted to and from the given unit.
No commensurable units does not imply the unit is invalid. Use /get-unit to check for validity.
Source§impl<C: Clone> Clone for AsyncUnitsServiceClient<C>
impl<C: Clone> Clone for AsyncUnitsServiceClient<C>
Source§fn clone(&self) -> AsyncUnitsServiceClient<C>
fn clone(&self) -> AsyncUnitsServiceClient<C>
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<C> Freeze for AsyncUnitsServiceClient<C>where
C: Freeze,
impl<C> !RefUnwindSafe for AsyncUnitsServiceClient<C>
impl<C> Send for AsyncUnitsServiceClient<C>where
C: Send,
impl<C> Sync for AsyncUnitsServiceClient<C>where
C: Sync,
impl<C> Unpin for AsyncUnitsServiceClient<C>where
C: Unpin,
impl<C> UnsafeUnpin for AsyncUnitsServiceClient<C>where
C: UnsafeUnpin,
impl<C> !UnwindSafe for AsyncUnitsServiceClient<C>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request