pub struct NoopCustomTagParser<S>(/* private fields */);Expand description
A fake custom tag parser which always fail.
§Why need this
If a tag convertor support custom tag and you also want it to be optional and impl Default trait,
normally you will use a Option<T: CustomTagParser<Custom>> in the convertor.
But the user still need to provide some type of that T(which the usually can’t) even if they do not want custom tag.
With this type, you can add a T = NoopCustomTagParser<Custom> in struct to make them happy.
Trait Implementations§
Source§impl<S> CustomTagParser for NoopCustomTagParser<S>
impl<S> CustomTagParser for NoopCustomTagParser<S>
Source§impl<S: Debug> Debug for NoopCustomTagParser<S>
impl<S: Debug> Debug for NoopCustomTagParser<S>
Auto Trait Implementations§
impl<S> Freeze for NoopCustomTagParser<S>
impl<S> RefUnwindSafe for NoopCustomTagParser<S>
impl<S> Send for NoopCustomTagParser<S>
impl<S> Sync for NoopCustomTagParser<S>
impl<S> Unpin for NoopCustomTagParser<S>
impl<S> UnwindSafe for NoopCustomTagParser<S>
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
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 more