pub struct Delegates { /* private fields */ }Implementations§
Source§impl Delegates
impl Delegates
pub fn new(client: Client) -> Delegates
pub fn all(&self) -> Result<Vec<Delegate>>
pub fn all_params<I, K, V>(&self, parameters: I) -> Result<Vec<Delegate>>
pub fn show(&self, id: &str) -> Result<Delegate>
pub fn blocks(&self, id: &str) -> Result<Vec<Block>>
pub fn blocks_params<I, K, V>( &self, id: &str, parameters: I, ) -> Result<Vec<Block>>
pub fn voters(&self, id: &str) -> Result<Vec<Wallet>>
pub fn voters_params<I, K, V>( &self, id: &str, parameters: I, ) -> Result<Vec<Wallet>>
Sourcepub fn voters_balances(&self, id: &str) -> Result<Balances>
pub fn voters_balances(&self, id: &str) -> Result<Balances>
Returns the voters of a delegate and their balances
§Example
let delegate_id = "yo";
let voters_balances = client.delegates.voters_balances(&delegate_id).unwrap();
println!("{}", to_string_pretty(&voters_balances).unwrap());Sourcepub fn search<I, K, V>(
&self,
payload: Option<HashMap<&str, &str>>,
parameters: I,
) -> Result<Vec<Delegate>>
pub fn search<I, K, V>( &self, payload: Option<HashMap<&str, &str>>, parameters: I, ) -> Result<Vec<Delegate>>
Searches the delegates
§Example
let payload = [("username", "p")].iter();
let params = [("limit", "2")].iter();
let search = client.delegates.search(Some(payload), params).unwrap();
println!("{}", to_string_pretty(&search).unwrap());Auto Trait Implementations§
impl Freeze for Delegates
impl !RefUnwindSafe for Delegates
impl Send for Delegates
impl Sync for Delegates
impl Unpin for Delegates
impl !UnwindSafe for Delegates
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> 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