pub struct Constant<T>(pub T);
Expand description
A lens that always gives the same value and discards changes.
Tuple Fields§
§0: T
Trait Implementations§
impl<T: Copy> Copy for Constant<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Constant<T>where T: RefUnwindSafe,
impl<T> Send for Constant<T>where T: Send,
impl<T> Sync for Constant<T>where T: Sync,
impl<T> Unpin for Constant<T>where T: Unpin,
impl<T> UnwindSafe for Constant<T>where T: UnwindSafe,
Blanket Implementations§
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>
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.