[][src]Struct nakadion::consumer::TickIntervalMillis

pub struct TickIntervalMillis(_);

The internal tick interval.

The applied value is always between [100..5_000] ms. When set outside of its bounds it will be adjusted to fit within the bounds.

Methods

impl TickIntervalMillis[src]

pub fn new<T: Into<u64>>(v: T) -> Self[src]

impl TickIntervalMillis[src]

pub fn into_inner(self) -> u64[src]

impl TickIntervalMillis[src]

pub fn try_from_env() -> Result<Option<Self>, Error>[src]

Initialize from the environment.

Returns None if the value was not found and fails if the value could not be parsed.

The name of the environment variable is "NAKADION_ TICK_INTERVAL_MILLIS "

pub fn try_from_env_prefixed<T: Into<String>>(
    prefix: T
) -> Result<Option<Self>, Error>
[src]

Initialize from the environment.

Returns None if the value was not found and fails if the value could not be parsed.

The name of the environment variable is "prefix_ TICK_INTERVAL_MILLIS "

pub fn try_from_env_named<T: AsRef<str>>(
    var_name: T
) -> Result<Option<Self>, Error>
[src]

Initialize from the environment.

Returns None if the value was not found and fails if the value could not be parsed.

The name of the environment variable is var_name.

pub fn from_env() -> Result<Self, Error>[src]

Initialize from the environment.

Fails if the value was not found or if the value could not be parsed.

The name of the environment variable is "NAKADION_ TICK_INTERVAL_MILLIS "

pub fn from_env_prefixed<T: Into<String>>(prefix: T) -> Result<Self, Error>[src]

Initialize from the environment.

Fails if the value was not found or if the value could not be parsed.

The name of the environment variable is "prefix_ TICK_INTERVAL_MILLIS "

pub fn from_env_named<T: AsRef<str>>(var_name: T) -> Result<Self, Error>[src]

Initialize from the environment.

Fails if the value was not found or if the value could not be parsed.

The name of the environment variable is var_name.

pub fn from_env_opt() -> Option<Self>[src]

Initialize from the environment.

Returns None if the value could not be read for any reason.

The name of the environment variable is "NAKADION_ TICK_INTERVAL_MILLIS "

pub fn from_env_opt_prefixed<T: Into<String>>(prefix: T) -> Option<Self>[src]

Initialize from the environment.

Returns None if the value could not be read for any reason.

The name of the environment variable is "prefix_ TICK_INTERVAL_MILLIS "

pub fn from_env_opt_named<T: AsRef<str>>(var_name: T) -> Option<Self>[src]

Initialize from the environment.

Returns None if the value could not be read for any reason.

The name of the environment variable is var_name.

pub fn into_duration(self) -> Duration[src]

impl TickIntervalMillis[src]

pub fn adjust(self) -> TickIntervalMillis[src]

Only 100ms up to 5_000ms allowed. We simply adjust the values because there is no reason to crash if these have been set to an out of range value.

Trait Implementations

impl Clone for TickIntervalMillis[src]

impl Copy for TickIntervalMillis[src]

impl Debug for TickIntervalMillis[src]

impl Default for TickIntervalMillis[src]

impl<'de> Deserialize<'de> for TickIntervalMillis[src]

impl Display for TickIntervalMillis[src]

impl Eq for TickIntervalMillis[src]

impl From<TickIntervalMillis> for u64[src]

impl From<TickIntervalMillis> for Duration[src]

impl From<u64> for TickIntervalMillis[src]

impl FromStr for TickIntervalMillis[src]

type Err = Error

The associated error which can be returned from parsing.

impl PartialEq<TickIntervalMillis> for TickIntervalMillis[src]

impl Serialize for TickIntervalMillis[src]

impl StructuralEq for TickIntervalMillis[src]

impl StructuralPartialEq for TickIntervalMillis[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,