pub struct TidesRequest<A = ProvidedArgument> { /* private fields */ }
Expand description
Tides API request. Tides API request.
Request is validated when supplied to the client.
Implementations§
Source§impl TidesRequest
impl TidesRequest
Sourcepub fn new() -> TidesRequest<RequiredArgument>
pub fn new() -> TidesRequest<RequiredArgument>
Start building a new request.
Source§impl<A> TidesRequest<A>
impl<A> TidesRequest<A>
Sourcepub fn with_placeid(
self,
placeid: impl Into<String>,
) -> TidesRequest<ProvidedArgument>
pub fn with_placeid( self, placeid: impl Into<String>, ) -> TidesRequest<ProvidedArgument>
Add a placeid to the request.
Sourcepub fn set_onlyhighlow(self, enable: bool) -> Self
pub fn set_onlyhighlow(self, enable: bool) -> Self
Set whether to return every point per interval or just the highest and lowest points.
Sourcepub fn set_startdt(self, startdt: DateTime) -> Self
pub fn set_startdt(self, startdt: DateTime) -> Self
Set start of the requested time interval.
Sourcepub fn set_radius(self, radius: i32) -> Self
pub fn set_radius(self, radius: i32) -> Self
Set radius from the requested location to query for stations. Given in kilometers.
Sourcepub fn set_subordinate(self, enable: bool) -> Self
pub fn set_subordinate(self, enable: bool) -> Self
Toggle whether to resolve also subordinate stations or just reference stations.
Sourcepub fn set_interval(self, interval: i32) -> Self
pub fn set_interval(self, interval: i32) -> Self
Set how many minutes to calculate the range in. Supported: 5 min, 15, min, 30 min, 60 min.
Sourcepub fn set_localtime(self, enable: bool) -> Self
pub fn set_localtime(self, enable: bool) -> Self
Toggle whether input and output time stamps should be resolved to local time.
Trait Implementations§
Source§impl<A: Default> Default for TidesRequest<A>
impl<A: Default> Default for TidesRequest<A>
Source§fn default() -> TidesRequest<A>
fn default() -> TidesRequest<A>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<A> Freeze for TidesRequest<A>
impl<A> RefUnwindSafe for TidesRequest<A>where
A: RefUnwindSafe,
impl<A> Send for TidesRequest<A>where
A: Send,
impl<A> Sync for TidesRequest<A>where
A: Sync,
impl<A> Unpin for TidesRequest<A>where
A: Unpin,
impl<A> UnwindSafe for TidesRequest<A>where
A: UnwindSafe,
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