pub struct ArgumentValidators { /* private fields */ }Expand description
A tool-name to ArgumentValidator registry.
Registration is LAST-ONE-WINS, and a replacement is announced once by a
tracing::warn! — a silently discarded validator is a rule the operator
believes is enforced and is not.
Implementations§
Source§impl ArgumentValidators
impl ArgumentValidators
Sourcepub fn insert(
&mut self,
tool: impl Into<String>,
validator: Arc<dyn ArgumentValidator>,
)
pub fn insert( &mut self, tool: impl Into<String>, validator: Arc<dyn ArgumentValidator>, )
Register validator for the tool named tool, REPLACING any validator
already registered under that name and warning once when it does.
Trait Implementations§
Source§impl Clone for ArgumentValidators
impl Clone for ArgumentValidators
Source§impl Debug for ArgumentValidators
impl Debug for ArgumentValidators
Auto Trait Implementations§
impl !RefUnwindSafe for ArgumentValidators
impl !UnwindSafe for ArgumentValidators
impl Freeze for ArgumentValidators
impl Send for ArgumentValidators
impl Sync for ArgumentValidators
impl Unpin for ArgumentValidators
impl UnsafeUnpin for ArgumentValidators
Blanket Implementations§
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.