pub struct SignedWindow { /* private fields */ }Expand description
A signed interval, used only for profile metadata such as
BIG_BANG_CLAIM (Rule Q.3).
The window is signed because the FLRW t→0 limit may lie before the datum, which is not representable as a tick (N12).
This type deliberately has:
- no arithmetic operators of any kind,
- no
From<SignedWindow>forDelta,InstantorWindow, - no method returning any of those types.
It cannot be added to an Instant and cannot be widened into one. Attempting
to use it as an operand is UCAL-E0025, and the type system is what makes
that unreachable rather than a runtime check. §21.3-3 requires a compile-fail
test; see tests/compile_fail/.
Implementations§
Source§impl SignedWindow
impl SignedWindow
Sourcepub fn new(lo: Signed, hi: Signed) -> Result<Self>
pub fn new(lo: Signed, hi: Signed) -> Result<Self>
Construct from bounds. Fails with UCAL-E0022 if inverted.
Sourcepub fn symmetric(half_width: Delta) -> Self
pub fn symmetric(half_width: Delta) -> Self
A symmetric window +/- half_width about zero. D-16: the half-width form
matches how the Planck 2018 uncertainty is published, without foreclosing
asymmetric windows, which SignedWindow::new still permits.
Trait Implementations§
Source§impl Clone for SignedWindow
impl Clone for SignedWindow
Source§fn clone(&self) -> SignedWindow
fn clone(&self) -> SignedWindow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SignedWindow
Source§impl Debug for SignedWindow
impl Debug for SignedWindow
impl Eq for SignedWindow
Source§impl PartialEq for SignedWindow
impl PartialEq for SignedWindow
impl StructuralPartialEq for SignedWindow
Auto Trait Implementations§
impl Freeze for SignedWindow
impl RefUnwindSafe for SignedWindow
impl Send for SignedWindow
impl Sync for SignedWindow
impl Unpin for SignedWindow
impl UnsafeUnpin for SignedWindow
impl UnwindSafe for SignedWindow
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