Struct abstract_app::traits::AbstractNameServiceClient
source · pub struct AbstractNameServiceClient<'a, T>where
T: AbstractNameService,{
pub host: AnsHost,
/* private fields */
}Expand description
ANCHOR_END: ans
Fields§
§host: AnsHostAbstract Name Service Contract
Implementations§
source§impl<'a, T> AbstractNameServiceClient<'a, T>where
T: ModuleIdentification + AbstractNameService,
impl<'a, T> AbstractNameServiceClient<'a, T>where
T: ModuleIdentification + AbstractNameService,
sourcepub fn query<R>(
&self,
entry: &R
) -> Result<<R as Resolve>::Output, AbstractSdkError>where
R: Resolve,
pub fn query<R>(
&self,
entry: &R
) -> Result<<R as Resolve>::Output, AbstractSdkError>where
R: Resolve,
Query ans entry
sourcepub fn is_registered(&self, entry: &impl Resolve) -> bool
pub fn is_registered(&self, entry: &impl Resolve) -> bool
Returns if the entry is registered on the ANS. Will return an Err if the query failed for technical reasons (like a wrong address or state parsing error). Will return true if found. Will return false if not found.
sourcepub fn assert_registered(
&self,
entry: &impl Resolve
) -> Result<(), AbstractSdkError>
pub fn assert_registered( &self, entry: &impl Resolve ) -> Result<(), AbstractSdkError>
Assert that an entry is registered on the ANS. Will return an Err if the entry is not registered.
sourcepub fn pool_list(
&self,
filter: Option<AssetPairingFilter>,
page_limit: Option<u8>,
start_after: Option<DexAssetPairing>
) -> Result<Vec<(DexAssetPairing, Vec<PoolReference>)>, AbstractSdkError>
pub fn pool_list( &self, filter: Option<AssetPairingFilter>, page_limit: Option<u8>, start_after: Option<DexAssetPairing> ) -> Result<Vec<(DexAssetPairing, Vec<PoolReference>)>, AbstractSdkError>
Smart-query the available trading pools.
sourcepub fn registered_dexes(
&self
) -> Result<RegisteredDexesResponse, AbstractSdkError>
pub fn registered_dexes( &self ) -> Result<RegisteredDexesResponse, AbstractSdkError>
Raw-query the available dexes on the chain.
Trait Implementations§
source§impl<'a, T> Clone for AbstractNameServiceClient<'a, T>where
T: Clone + AbstractNameService,
impl<'a, T> Clone for AbstractNameServiceClient<'a, T>where
T: Clone + AbstractNameService,
source§fn clone(&self) -> AbstractNameServiceClient<'a, T>
fn clone(&self) -> AbstractNameServiceClient<'a, T>
Returns a copy 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<'a, T> Freeze for AbstractNameServiceClient<'a, T>
impl<'a, T> !RefUnwindSafe for AbstractNameServiceClient<'a, T>
impl<'a, T> !Send for AbstractNameServiceClient<'a, T>
impl<'a, T> !Sync for AbstractNameServiceClient<'a, T>
impl<'a, T> Unpin for AbstractNameServiceClient<'a, T>
impl<'a, T> !UnwindSafe for AbstractNameServiceClient<'a, T>
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> 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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§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