pub struct FeedOrigins {
by_id: HashMap<u32, FeedOrigin>,
default_v4: Option<u32>,
default_v6: Option<u32>,
}Expand description
The configured origins available to feed targets, and the default origins for each IP version.
Fields§
§by_id: HashMap<u32, FeedOrigin>Origin ID -> IP version and protocol, to match feed targets with compatible origins
default_v4: Option<u32>First configured IPv4 origin (default for IPv4 targets without an origin field)
default_v6: Option<u32>First configured IPv6 origin (default for IPv6 targets without an origin field)
Implementations§
Source§impl FeedOrigins
impl FeedOrigins
Sourcepub fn new(configurations: &[Configuration]) -> Self
pub fn new(configurations: &[Configuration]) -> Self
Collect the unique origins of a measurement. Set the first origin of each IP version as that version’s default.
Sourcefn default_for(&self, is_v6: bool) -> Option<u32>
fn default_for(&self, is_v6: bool) -> Option<u32>
The default origin for a target of the given IP version.
Returns None if no origin of that version is configured.
Sourcefn has_version(&self, is_v6: bool) -> bool
fn has_version(&self, is_v6: bool) -> bool
Whether an origin of the given IP version is configured.
Auto Trait Implementations§
impl Freeze for FeedOrigins
impl RefUnwindSafe for FeedOrigins
impl Send for FeedOrigins
impl Sync for FeedOrigins
impl Unpin for FeedOrigins
impl UnsafeUnpin for FeedOrigins
impl UnwindSafe for FeedOrigins
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].