pub struct Source { /* private fields */ }Implementations§
Source§impl Source
impl Source
pub async fn connect(url: &str, user: &str) -> Result<Source, String>
Sourcepub async fn state_page(
&mut self,
sequence: u32,
marker: &[u8],
end: &[u8],
) -> Result<(Vec<([u8; 32], Vec<u8>)>, Vec<u8>), String>
pub async fn state_page( &mut self, sequence: u32, marker: &[u8], end: &[u8], ) -> Result<(Vec<([u8; 32], Vec<u8>)>, Vec<u8>), String>
Ledger state objects with keys strictly greater than marker and strictly
less than end (empty means unbounded). Returns the objects and a
continuation marker; an empty marker means the range is exhausted.
Sourcepub async fn header(&mut self, sequence: u32) -> Result<Vec<u8>, String>
pub async fn header(&mut self, sequence: u32) -> Result<Vec<u8>, String>
Ledger header (118 bytes) without transactions.
Sourcepub async fn require_unlimited(&mut self) -> Result<(), String>
pub async fn require_unlimited(&mut self) -> Result<(), String>
Requires the node to exempt us from rate limits
(is_unlimited in the response).
xrpld charges by address, not by client: without the exemption, heavy requests are charged to an address shared with neighboring services.
The exemption alone is not enough. A state snapshot taken on a machine running Clio had the exemption but still loaded the machine: 4.8 GB in 3.6 minutes over a tunnel and onto disk. Clio fell behind reading its subscriptions, both upstream nodes treated it as a slow client and dropped it, and it went down twice. Don’t run heavy jobs on a machine running Clio.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Source
impl !RefUnwindSafe for Source
impl !UnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnsafeUnpin for Source
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].