pub struct UsgsEarthquakeClient { /* private fields */ }Expand description
Client for USGS Earthquake Hazards Program
Provides access to:
- Real-time earthquake data worldwide
- Historical earthquake records
- Magnitude, location, depth information
- Tsunami warnings and alerts
§Example
ⓘ
use ruvector_data_framework::UsgsEarthquakeClient;
let client = UsgsEarthquakeClient::new()?;
let recent = client.get_recent(4.5, 7).await?; // Mag 4.5+, last 7 days
let regional = client.search_by_region(35.0, -118.0, 200.0, 30).await?;
let significant = client.get_significant(30).await?;Implementations§
Source§impl UsgsEarthquakeClient
impl UsgsEarthquakeClient
Sourcepub async fn get_recent(
&self,
min_magnitude: f64,
days: u32,
) -> Result<Vec<SemanticVector>>
pub async fn get_recent( &self, min_magnitude: f64, days: u32, ) -> Result<Vec<SemanticVector>>
Sourcepub async fn search_by_region(
&self,
lat: f64,
lon: f64,
radius_km: f64,
days: u32,
) -> Result<Vec<SemanticVector>>
pub async fn search_by_region( &self, lat: f64, lon: f64, radius_km: f64, days: u32, ) -> Result<Vec<SemanticVector>>
Sourcepub async fn get_significant(&self, days: u32) -> Result<Vec<SemanticVector>>
pub async fn get_significant(&self, days: u32) -> Result<Vec<SemanticVector>>
Sourcepub async fn get_by_magnitude_range(
&self,
min: f64,
max: f64,
days: u32,
) -> Result<Vec<SemanticVector>>
pub async fn get_by_magnitude_range( &self, min: f64, max: f64, days: u32, ) -> Result<Vec<SemanticVector>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UsgsEarthquakeClient
impl !RefUnwindSafe for UsgsEarthquakeClient
impl Send for UsgsEarthquakeClient
impl Sync for UsgsEarthquakeClient
impl Unpin for UsgsEarthquakeClient
impl !UnwindSafe for UsgsEarthquakeClient
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 more