Struct tokio_cadence::builder::Builder [−][src]
Builder allows you to override various default parameter values before creating an instance of the desired Metric Sink.
Implementations
impl<T, S> Builder<T, S>
[src]
pub fn queue_cap(&mut self, queue_cap: usize) -> &mut Self
[src]
Sets the maximum metric queue capacity (default: DEFAULT_QUEUE_CAPACITY
).
pub fn buf_size(&mut self, buf_size: usize) -> &mut Self
[src]
Sets the batch buffer size (default: DEFAULT_BATCH_BUF_SIZE
).
pub fn max_delay(&mut self, max_delay: Duration) -> &mut Self
[src]
Sets the maximum delay before flushing any buffered metrics (default: DEFAULT_MAX_BATCH_DELAY
).
impl<T: ToSocketAddrs> Builder<T, UdpSocket>
[src]
pub fn build(
self
) -> MetricResult<(TokioBatchUdpMetricSink, Pin<Box<dyn Future<Output = ()> + Send + Sync + 'static>>)>
[src]
self
) -> MetricResult<(TokioBatchUdpMetricSink, Pin<Box<dyn Future<Output = ()> + Send + Sync + 'static>>)>
Creates a customized instance of the TokioBatchUdpMetricSink
.
Errors
Returns an error when unable to resolve the configured host address, or when the configured queue capacity is 0.
impl<T: AsRef<Path> + Send + Sync + Unpin + 'static> Builder<T, UnixDatagram>
[src]
pub fn build(
self
) -> MetricResult<(TokioBatchUnixMetricSink, Pin<Box<dyn Future<Output = ()> + Send + Sync + 'static>>)>
[src]
self
) -> MetricResult<(TokioBatchUnixMetricSink, Pin<Box<dyn Future<Output = ()> + Send + Sync + 'static>>)>
Creates a customized instance of the TokioBatchUnixMetricSink
.
Errors
Returns an error when the configured queue capacity is 0.
Trait Implementations
Auto Trait Implementations
impl<T, S> RefUnwindSafe for Builder<T, S> where
S: RefUnwindSafe,
T: RefUnwindSafe,
[src]
S: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, S> Send for Builder<T, S> where
S: Send,
T: Send,
[src]
S: Send,
T: Send,
impl<T, S> Sync for Builder<T, S> where
S: Sync,
T: Sync,
[src]
S: Sync,
T: Sync,
impl<T, S> Unpin for Builder<T, S> where
S: Unpin,
T: Unpin,
[src]
S: Unpin,
T: Unpin,
impl<T, S> UnwindSafe for Builder<T, S> where
S: UnwindSafe,
T: UnwindSafe,
[src]
S: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,