TidesRequest

Struct TidesRequest 

Source
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

Source

pub fn new() -> TidesRequest<RequiredArgument>

Start building a new request.

Source§

impl<A> TidesRequest<A>

Source

pub fn with_placeid( self, placeid: impl Into<String>, ) -> TidesRequest<ProvidedArgument>

Add a placeid to the request.

Source

pub fn set_onlyhighlow(self, enable: bool) -> Self

Set whether to return every point per interval or just the highest and lowest points.

Source

pub fn set_startdt(self, startdt: DateTime) -> Self

Set start of the requested time interval.

Source

pub fn set_enddt(self, enddt: DateTime) -> Self

Set end of the requested time interval.

Source

pub fn set_radius(self, radius: i32) -> Self

Set radius from the requested location to query for stations. Given in kilometers.

Source

pub fn set_subordinate(self, enable: bool) -> Self

Toggle whether to resolve also subordinate stations or just reference stations.

Source

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.

Source

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>

Source§

fn default() -> TidesRequest<A>

Returns the “default value” for a type. Read more
Source§

impl<A> Serialize for TidesRequest<A>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,