Struct icu_calendar::Ref
source · 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 C
Trait Implementations§
source§impl<C: Calendar> AsCalendar for Ref<'_, C>
impl<C: Calendar> AsCalendar for Ref<'_, C>
source§impl<'a, C: PartialEq> PartialEq for Ref<'a, C>
impl<'a, C: PartialEq> PartialEq for Ref<'a, 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