pub(crate) enum ExporterMode {
Direct,
Worker,
}Expand description
Exporter runtime mode.
Variants§
Direct
Serve export requests directly over a local WebSocket endpoint.
Worker
Subscribe to NATS export request subjects and reply with framed chunks.
Implementations§
Source§impl ExporterMode
impl ExporterMode
Sourcepub(crate) fn from_env() -> Result<Self>
pub(crate) fn from_env() -> Result<Self>
Reads and validates EXPORTER_MODE.
The value is trimmed and lowercased. direct and local select
ExporterMode::Direct, worker selects ExporterMode::Worker, and an
unset variable falls back to DEFAULT_EXPORTER_MODE.
§Errors
Returns an error if the variable is set to any other value.
Trait Implementations§
Source§impl Clone for ExporterMode
impl Clone for ExporterMode
Source§fn clone(&self) -> ExporterMode
fn clone(&self) -> ExporterMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ExporterMode
Source§impl Debug for ExporterMode
impl Debug for ExporterMode
impl Eq for ExporterMode
Source§impl PartialEq for ExporterMode
impl PartialEq for ExporterMode
impl StructuralPartialEq for ExporterMode
Auto Trait Implementations§
impl Freeze for ExporterMode
impl RefUnwindSafe for ExporterMode
impl Send for ExporterMode
impl Sync for ExporterMode
impl Unpin for ExporterMode
impl UnsafeUnpin for ExporterMode
impl UnwindSafe for ExporterMode
Blanket Implementations§
impl<T> Allocation for T
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more