pub struct Ref<'a, C>(pub &'a C);Expand description
This exists as a wrapper around &'a T so that
Date<&'a C> is possible for calendar C.
Unfortunately,
AsCalendar cannot be implemented on &'a T directly because
&'a T is #[fundamental] and the impl would clash with the one above with
AsCalendar for C: Calendar.
Use Date<Ref<'a, C>> where you would use Date<&'a C>
Tuple Fields§
§0: &'a CTrait Implementations§
Source§impl<C: Calendar> AsCalendar for Ref<'_, C>
impl<C: Calendar> AsCalendar for Ref<'_, C>
impl<C> Copy for Ref<'_, C>
impl<'a, C: Eq> Eq for Ref<'a, C>
impl<'a, C> StructuralPartialEq for Ref<'a, C>
Auto Trait Implementations§
impl<'a, C> Freeze for Ref<'a, C>
impl<'a, C> RefUnwindSafe for Ref<'a, C>where
C: RefUnwindSafe,
impl<'a, C> Send for Ref<'a, C>where
C: Sync,
impl<'a, C> Sync for Ref<'a, C>where
C: Sync,
impl<'a, C> Unpin for Ref<'a, C>
impl<'a, C> UnwindSafe for Ref<'a, C>where
C: RefUnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes