pub struct AbstractNameServiceClient<'a, T>where
T: AbstractNameService,{
pub host: AnsHost,
/* private fields */
}
Expand description
ANCHOR_END: ans
Fields§
§host: AnsHost
Abstract Name Service Contract
Implementations§
Source§impl<T> AbstractNameServiceClient<'_, T>where
T: ModuleIdentification + AbstractNameService,
impl<T> AbstractNameServiceClient<'_, 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 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<'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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more