[][src]Struct buffett_core::token_service::Drone

pub struct Drone {
    pub time_slice: Duration,
    pub request_current: u64,
    // some fields omitted
}

Fields

time_slice: Durationrequest_current: u64

Methods

impl Drone[src]

pub fn new(
    mint_keypair: Keypair,
    _airdrop_addr: SocketAddr,
    network_addr: SocketAddr,
    time_input: Option<u64>,
    request_cap_input: Option<u64>
) -> Drone
[src]

pub fn check_request_limit(&mut self, request_amount: u64) -> bool[src]

pub fn clear_request_count(&mut self)[src]

pub fn add_ip_to_cache(&mut self, ip: IpAddr)[src]

pub fn clear_ip_cache(&mut self)[src]

pub fn check_rate_limit(&mut self, ip: IpAddr) -> Result<IpAddr, IpAddr>[src]

pub fn send_airdrop(&mut self, req: DroneRequest) -> Result<Signature, Error>[src]

Trait Implementations

impl Drop for Drone[src]

Auto Trait Implementations

impl Send for Drone

impl Sync for Drone

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Erased for T

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.