Skip to main content

Timestamp

Struct Timestamp 

Source
pub struct Timestamp(/* private fields */);
Expand description

An instant on the UTC timeline, to the NANOSECOND, from -9999-01-02T01:59:59Z to 9999-12-30T22:00:00.999999999Z.

The framework’s own temporal citizen, present in EVERY build: jiff is a required dependency here rather than a vocabulary feature, so a record the FRAMEWORK ships can stamp a time without the build having asked for a temporal vocabulary first.

Temporal<T> is the other temporal name in this crate and answers the other question — it is the storage WRAPPER a user-declared jiff or time value crosses into, behind the jiff and time features, where this type is the framework’s own instant and stands whatever the features say.

§Why a newtype and not jiff::Timestamp itself

The orphan rule, at the one place it actually bites. A filter registration would not have needed this — to_filter!’s two traits are local, so jiff’s own types are registered here already — but the WIRE FACE cannot be written for a foreign type: impl async_graphql::ScalarType for jiff::Timestamp is E0117, both halves foreign, which is the same wall graphql::filter:: duration hit and answered with a newtype of its own. A citizen this crate is going to give a scalar, a comparison and a storage shape to has to be a type this crate owns.

It is also what keeps the SHAPE the framework’s decision rather than jiff’s: the range and the precision above are promises made here, and the columns an instant occupies are chosen here.

§The range, and what refuses

MIN and MAX are jiff’s own bounds and they are not the i64 nanosecond ceiling a Unix timestamp usually carries: there is no 2262 problem here, and no 1677 one either. What they ARE is ±9999 years, chosen by jiff so that either bound combined with any legal zone offset still lands on a representable civil date.

So the one lossy direction is a SystemTime from outside that span, and it REFUSES — TryFrom rather than a saturating From, because an instant substituted for the one a caller handed over is a wrong answer reported as a right one. Nothing else about that crossing is lossy: nanoseconds survive it in both directions.

§Ordering, equality and hashing are the INSTANT’s

All three are derived, and on a one-field newtype a derive IS the delegation. What makes it the right delegation is that an instant has nothing to normalise: this type holds no zone and no offset, so two spellings of one moment — 2026-08-09T21:14:03+09:00 and 2026-08-09T12:14:03Z — parse to one value that compares, hashes and renders as one.

Implementations§

Source§

impl Timestamp

Source

pub const UNIX_EPOCH: Self

1970-01-01T00:00:00Z, the zero of the timeline.

Source

pub const MIN: Self

The earliest representable instant, -9999-01-02T01:59:59Z.

Source

pub const MAX: Self

The latest representable instant, 9999-12-30T22:00:00.999999999Z.

Source

pub const fn get(&self) -> Timestamp

The instant as jiff’s own type — the whole of jiff’s arithmetic, zone and calendar surface, reached rather than re-exposed.

By VALUE because jiff::Timestamp is Copy, so a reference would buy an indirection and no ownership.

Source

pub fn as_second(&self) -> i64

The WHOLE seconds since the epoch — the first of the two columns this type occupies.

jiff’s own name for jiff’s own answer. It TRUNCATES towards zero rather than flooring, so a pre-epoch instant answers a negative second and a negative fraction beside it: -0.5s is (0, -500_000_000) and not (-1, 500_000_000). That is the pairing from_parts reads back, and the two halves therefore never disagree in sign.

Source

pub fn subsec_nanosecond(&self) -> i32

The FRACTION, in nanoseconds — the second of the two columns.

Signed, and the sign is the instant’s: see as_second for the pairing the two answers make together. Its magnitude is always below one second.

Source

pub fn from_parts( second: i64, nanosecond: i32, ) -> Result<Self, TimestampPartsError>

The instant those two columns hold — the read half of the pair as_second and subsec_nanosecond write.

§It REFUSES what it would otherwise have NORMALISED, and that is the whole of the check

jiff::Timestamp::new accepts a pair whose halves disagree in sign and quietly resolves it: (2, -999_999_999) becomes (1, 1), the same instant spelled another way. Read from a column that is exactly the failure this crate refuses everywhere else — a stored value nothing here wrote, silently turned into one that could have been. So the pair is built through jiff and then held against what it answers: a pair that survives unchanged is the pair this encoding writes, and every other one is Unnormalised.

It is the round trip MongoExtract’s f32 row already makes for the same reason — narrow, widen, and compare — applied to a value of two integers rather than to one float.

§Errors

TimestampPartsError::Range carries jiff’s own refusal: a nanosecond outside -999_999_999..=999_999_999, or a pair naming an instant outside the ±9999-year span. TimestampPartsError::Unnormalised is the check above, and carries the pair that failed it.

§Examples
use ingraph::Timestamp;

let at: Timestamp = "2026-08-09T21:14:03.123456789Z".parse().unwrap();
assert_eq!(
  Timestamp::from_parts(at.as_second(), at.subsec_nanosecond()).unwrap(),
  at
);

// The sign-crossing spelling of the same instant is REFUSED rather than resolved.
assert!(Timestamp::from_parts(2, -999_999_999).is_err());
assert_eq!(
  Timestamp::from_parts(1, 1).unwrap(),
  "1970-01-01T00:00:01.000000001Z".parse::<Timestamp>().unwrap()
);

Trait Implementations§

Source§

impl<'a, R> Assemble<'a, R> for Timestamp
where R: Row, i64: Assemble<'a, R>, i32: Assemble<'a, R>,

Available on crate feature sqlx only.

AND TWO COLUMNS BACK IN, with the teeth on the way — the read half of the framework’s own composite, and the third of the three facts a stored one states.

Each part reads through assembled, so under carries the holder’s segment for a field that lends its name and nothing extra for one marked flatten, and this one body serves both without knowing which it is reading. A missing or undecodable part is try_get’s own error naming at_nanos rather than at, exactly as the trait’s note promises.

§It is the ONE row here that CONSTRUCTS an error, and the reason is the recomposition

Every other row hands try_get’s answer straight back, because a column that decodes into its Rust type is the whole of what a scalar has to check. Two columns that each decode can still fail to be an instant — a nanos past a second, a pair whose halves disagree in sign — and nothing beneath this can see the pair. So the refusal is built here, as ColumnDecode naming the nanos column: it is the half that cannot stand beside the other, and it is a name a SELECT can be pointed at.

What is refused rather than resolved is from_parts’s, stated once for both families — the MongoDB row makes the same call and gives the same answer in its own vocabulary.

Source§

fn assemble(row: &'a R, under: Option<&Path<'_>>) -> Result<Self>

Read this value out of row, under the segments under names. Read more
Source§

impl<Db> Carrier<Db> for Timestamp
where Db: Database, i64: Carrier<Db>, i32: Carrier<Db>,

Available on crate feature sqlx only.

TWO BINDS OUT, and the comma between them is this row’s.

The framework’s own instant occupies two columns — see ColumnKind’s row for the width, which is the claim this one has to agree with. A caller writing a VALUES list counts FIELDS and puts a comma between them; the comma inside a field is here, because the count is the type’s.

§Generic over the dialect, where a DOWNSTREAM composite names one

The derive corpus’s Timebase writes three rows, one per dialect, and its own note says why: a generic header from outside this crate would overlap the framework’s rows for a backend that is not an sqlx::Database, and rustc cannot see from out there that none will arrive. From INSIDE there is nothing to overlap — this is the only row for this self type — so the header states the two parts’ own requirements and every dialect that carries an i64 and an i32 gets the instant for free. All three do.

The parts bind through their OWN rows rather than through push_bind directly, which is what keeps a dialect’s decision about an integer the dialect’s: Postgres widens four integer widths here, and a composite that reached past those rows would be a second binding path for the same value.

Source§

fn push_bind(&self, qb: &mut QueryBuilder<Db>)

Push this value’s placeholder and bound argument onto qb. Read more
Source§

fn push_value_bind(&self, qb: &mut QueryBuilder<Db>)

Push this value’s placeholders and bound arguments for its VALUE columns alone — the DERIVED leaves left out. Read more
Source§

impl Clone for Timestamp

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CollectionElement for Timestamp

The framework’s own instant is the first COMPOSITE element, and it carries no collection — its two segments are a whole-seconds integer and a nanosecond one.

It is the row every composite-element form in this crate is measured against, which is what makes it worth stating here rather than only in the corpus: a Vec<Timestamp> reaches an edge table of (key…, ordinal, at_secs, at_nanos), and each of the DDL, the write and the correlated predicate reads those two names off ColumnKind’s row above.

Source§

impl ColumnEq for Timestamp

Source§

fn column_eq(&self, other: &Self) -> bool

Whether self and other are the same stored value.
Source§

impl ColumnKind for Timestamp

The framework’s own instant is TWO columns, and it is the first shipped type that is.

It is stated here rather than listed in scalar_columns above, and the list is the reason: every entry there takes the default and says Plain, so a composite added to it would be a row whose body contradicts the macro’s own sentence. A composite states its parts, and this is what stating them looks like for a type this crate owns.

The parts are read from Timestamp’s own module rather than spelled here, which is the arrangement a DECLARED composite already has — one const its predicate, its binds, its reads and its sub-document keys all share. A rename there moves SELECT "at_secs", WHERE "at_secs" = ? and the secs key of a MongoDB sub-document together, and there is no second list to drift from.

Source§

const SEGMENTS: &'static [ColumnShape] = crate::primitives::timestamp::SEGMENTS

What this type spans beneath the field that names it. Read more
Source§

const ORDER: &'static [OrderLevel] = _

WHICH ORDER those columns mean — the leaves an order over this type sorts by, in sequence. Read more
Source§

impl Copy for Timestamp

Source§

impl CursorValue for Timestamp

The framework’s own instant: twelve bytes, both of its columns, and the pair CHECKED on the way back.

The first row here whose value spans more than one column, and the caller that asks for it is the storability audit — a record storing a Timestamp cannot be paged past without it, which is the compile error this row answers rather than a page that resumes at the wrong row. It is therefore a row written WITH its caller, which is the standard the module note holds Score and Temporal to while they wait for theirs.

FIXED WIDTH — eight big-endian bytes of seconds and four of nanoseconds — so a client’s eleven are refused rather than zero-extended into a plausible instant. That is the discipline the integer rows above follow, applied to a value of two of them, and it is the derive corpus’s own composite row read one type over.

The recomposition is from_parts’s, which makes this row the THIRD caller of one authority — the SQL decode and the MongoDB read are the other two — and the reason it matters here is the trait’s own: returning a plausible value for bytes this type did not write is how a forged cursor becomes a page. A pair jiff would have normalised is exactly such a value, so it is refused here as it is refused there.

Source§

fn write_cursor(&self, out: &mut Vec<u8>)

Append this value’s cursor bytes to out.
Source§

fn read_cursor(bytes: &[u8]) -> Option<Self>

The value bytes holds, or None where they are not this type’s encoding. Read more
Source§

impl Debug for Timestamp

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl DeclaredLeaves for Timestamp

One leaf, and it is the value. The framework’s instant means its two columns in the sequence it writes them, so a term over one stays the wide term it always was.

Source§

impl DefaultMarker for Timestamp

Source§

type Marker = ScalarMarker<Timestamp>

The interpretation this type is read under by default.
Source§

impl DefaultVecMarker for Timestamp

Source§

type Marker = ListMarker<Vec<Timestamp>>

The interpretation a Vec of this element type is read under by default. Read more
Source§

impl Display for Timestamp

RFC 3339, with the fewest fractional digits that render the value exactly — 2026-08-09T21:14:03Z for a whole second, 2026-08-09T21:14:03.123456789Z for one carrying nanoseconds. Never a bare integer, which is the form a client cannot read.

A NEGATIVE year has no RFC 3339 spelling and takes ISO 8601’s expanded form instead (-009999-01-02T01:59:59Z, which is MIN); every instant from the epoch onwards is RFC 3339 exactly.

The Formatter is PASSED THROUGH rather than written into, so jiff’s own precision option survives the newtype: {:.3} still asks for milliseconds and {:.0} still truncates the fraction away. A write!(f, "{}", …) here would drop both in silence.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Timestamp

Source§

impl From<Timestamp> for Contained

Source§

fn from(at: Timestamp) -> Self

Converts to this type from the input type.
Source§

impl From<Timestamp> for Timestamp

Source§

fn from(instant: Timestamp) -> Self

Converts to this type from the input type.
Source§

impl From<Timestamp> for Timestamp

Legal though jiff::Timestamp is foreign and From is: the trait’s PARAMETER is this crate’s type, which is what the orphan rule asks for.

Source§

fn from(instant: Timestamp) -> Self

Converts to this type from the input type.
Source§

impl From<Timestamp> for SystemTime

From and not TryFrom, because jiff’s own crossing is a From and this delegates to it rather than inventing a second policy. What that impl assumes is a platform time wide enough for the whole span, which is true where this crate runs — a timespec’s i64 seconds hold ±9999 years many times over — and is not a universal fact: a FILETIME-based SystemTime begins at 1601, and an instant before it would panic inside jiff. Recorded rather than guarded, since a guard here would be this crate answering for a conversion it does not own.

Source§

fn from(instant: Timestamp) -> Self

Converts to this type from the input type.
Source§

impl FromStr for Timestamp

The inverse of Display, and jiff’s parser rather than a second one: an offset spelling is accepted and NORMALISED to the instant it names, and a string with no offset at all is refused — a civil datetime is not an instant, and guessing UTC for it would invent the one fact it is missing.

The error is jiff’s own, kept rather than re-worded: it names the component it refused and where in the input, which is more than a wrapper of this crate’s would say.

Source§

type Err = Error

The associated error which can be returned from parsing.
Source§

fn from_str(text: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for Timestamp

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl InputType for Timestamp

Source§

type RawValueType = Timestamp

The raw type used for validator. Read more
Source§

fn type_name() -> Cow<'static, str>

Type the name.
Source§

fn create_type_info(registry: &mut Registry) -> String

Create type information in the registry and return qualified typename.
Source§

fn parse(value: Option<Value>) -> InputValueResult<Self>

Parse from Value. None represents undefined.
Source§

fn to_value(&self) -> Value

Convert to a Value for introspection.
Source§

fn as_raw_value(&self) -> Option<&Self::RawValueType>

Returns a reference to the raw value.
Source§

fn qualified_type_name() -> String

Qualified typename.
Source§

impl MongoCarrier for Timestamp

Available on crate feature mongo only.

The framework’s own instant, as the two flat integers it is — a sub-document holding secs as an Int64 and nanos as an Int32, under the same two names the SQL family’s columns take.

§The Temporal refusal above does not reach it, and the licence is one sentence

That refusal is about BSON’s DATE type: UtcDateTime is an i64 of milliseconds, so a row for a nanosecond-carrying instant would drop six digits in silence. No BSON date type is involved here — the value is two integers, both of which BSON holds exactly — so nothing is lost and the refusal has nothing to say about this row.

A sub-document rather than two fields spliced into the holder, which is the same asymmetry the flatten refusal on this backend already states: a composite is FLATTENED into columns wherever a table stores it and stays nested wherever a document does. So the two names are the segment names unjoined, and a filter reaches them as at.secs and at.nanos where SQL reaches at_secs and at_nanos.

BSON’s own comparison order compares two sub-documents field by field, in the order they were written, so a pair written by this row compares by seconds and then by nanoseconds — which IS the instant’s order, jiff’s signs being matched between the two halves. That is read from MongoDB’s documented BSON order rather than measured against a live server here, the same posture this module takes for BinData; the sort itself is not built.

§What a DOCUMENT can hold is a narrower question, and the answer today is measured

This row is what a FILTER operand and — since the write half landed — what a STORED DOCUMENT is written through: MongoWrite::document walks this table exactly as from_document walks MongoExtract’s. So nothing about this type stops it being stored by the lane.

What still narrows it is the EMITTED row’s own derives: ingraph-codegen’s mongo family derives serde’s pair on the document struct, and no storage type this crate ships carries a serde row — so a declaration naming a bare Timestamp column under mongo(…) is E0277 at the declaration, the trait bound Timestamp: serde::Serialize is not satisfied. That is the same answer a BeU64 column gets there and the same escape applies: the declaration names a type = "…" with its own conversions, which is what the derive corpus’s StoredTrack already does for exactly this reason.

The two halves no longer agree about WHY, and the gap is recorded rather than closed here: the derive is kept for a consumer’s own bson::to_document/from_document — see emit::mongo, which says so — and it is now the only party asking for serde, the framework’s own read and write both going through this crate’s two tables. Removing it would widen what a mongo row may hold to exactly what those tables cover, and that is the emitter’s change rather than this file’s.

Source§

fn to_bson(&self) -> Bson

This value as the BSON this crate stores it as.
Source§

impl MongoExtract for Timestamp

Available on crate feature mongo only.

The framework’s own instant, read back out of the two flat integers its carrier wrote.

object, because the pair is a sub-document — see MongoCarrier’s row for why a composite nests here and flattens in a table, and for the licence that makes this row exist at all beside the Temporal refusal.

The recomposition is from_parts’s, which is the SAME call the SQL family’s Assemble row makes: a pair that jiff would have NORMALISED is refused rather than resolved, so one document and one row cannot disagree about which pairs are instants. What differs between the two families is only the vocabulary the refusal is spoken in.

Each part is read at ITS OWN BSON type rather than through the i64 and i32 rows above, which is the shape the derive corpus’s composite takes too: those rows answer for a whole FIELD, and these two integers are parts of one.

Source§

const BSON: &'static str = "object"

The BSON type ALIAS this row reads — $type’s own word, so a refusal and a query that would find the offending documents spell the type the same way.
Source§

fn extract(value: Option<&Bson>) -> Result<Self, MongoTypeError>

This value, out of the BSON a document held at some field, or None where the field is absent. Read more
Source§

impl Ord for Timestamp

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl OutputType for Timestamp

Source§

fn type_name() -> Cow<'static, str>

Type the name.
Source§

fn create_type_info(registry: &mut Registry) -> String

Create type information in the registry and return qualified typename.
Source§

async fn resolve( &self, _: &ContextSelectionSet<'_>, _field: &Positioned<Field>, ) -> ServerResult<Value>

Available on non-crate feature boxed-trait only.
Resolve an output value to async_graphql::Value.
Source§

fn qualified_type_name() -> String

Qualified typename.
Source§

fn introspection_type_name(&self) -> Cow<'static, str>

Introspection type name Read more
Source§

impl PartialEq for Timestamp

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialOrd for Timestamp

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl ScalarFilterMarker for Timestamp

Source§

type Filter = ScalarFilter<Timestamp>

The filter a scalar column of this type gets.
Source§

impl ScalarType for Timestamp

An instant on the UTC timeline as RFC 3339 text — 2026-08-09T21:14:03.123456789Z — to the NANOSECOND, and never a bare integer.

An offset is accepted and normalised: 2026-08-09T21:14:03+09:00 is the same instant as 2026-08-09T12:14:03Z and comes back in the second form. A string with no offset is REFUSED, because a civil datetime is not an instant and the missing fact is not one a server may invent.

The range is ±9999 years, so a client is not writing against a 2262 ceiling.

Source§

fn is_valid(value: &Value) -> bool

The SAME parser parse runs, which is what makes a document that validates a document that parses. async-graphql’s default is_valid answers true for every value, so a scalar that narrows in parse alone ships a validator admitting what its own parser rejects — the reason ConfidenceOperand’s two halves read through one pair of constructors, applied here to a grammar rather than to a range.

Source§

fn parse(value: Value) -> InputValueResult<Self>

Parse a scalar value.
Source§

fn to_value(&self) -> Value

Convert the scalar to Value.
Source§

impl ScalarWire<Timestamp> for Builtin

Source§

const NAME: &'static str = "TimestampFilter"

The GraphQL input object a scalar filter over T under this reading is published as.
Source§

type Carrier = Timestamp

The wire type ONE operand crosses on. Read more
Source§

type Error = !

What a refused crossing says. Infallible where a crossing cannot refuse.
Source§

fn cross(carrier: Timestamp) -> Result<Timestamp, Infallible>

One operand, read off the wire. Read more
Source§

fn carry(operand: &Timestamp) -> Timestamp

One operand, written back onto the wire. Read more
Source§

impl<Db> StoredAs<Db> for Timestamp
where i64: StoredAs<Db>, i32: StoredAs<Db>,

TWO WORDS OUT, and the pair is read off the parts rather than restated.

The framework’s own instant occupies two columns — an i64 second and an i32 subsecond nanosecond, which is what its Carrier row binds — so its declaration is those two types’ own words in that order. Nothing here spells bigint or INTEGER: a dialect that changed its mind about how it stores an i64 would move this row with it.

§Generic over the dialect, which is what the FIXED arity buys

The array has length two whatever Db is, so one impl covers every dialect that carries both parts — all three do. This is the shape every composite in this crate takes, and the boundary it stops at is TimeRanged<T>’s: see this module’s note, where the two compiler refusals are recorded.

Source§

const WORDS: &'static [&'static str]

One word per column this type spans, in SEGMENTS order, written in this dialect catalogue’s own reported spelling.
Source§

impl StructuralPartialEq for Timestamp

Source§

impl<Db> ToDatabaseComparison<Timestamp, Db> for TimeRangeFilter
where Db: Database + for<'q> Backend<Builder<'q> = SqlConjunction<'q, Db>, Buffer: Display>, Timestamp: Carrier<Db> + ColumnKind,

Available on crate feature sqlx only.

Every SQL dialect takes the range filter to the range comparison, and the storage type is Timestamp — the ONE type all four columns hold, so one word covers them.

Source§

type Comparison = SqlTimeRangeComparison<Db>

The comparison a filter of this kind crosses into, holding V and lowering for Db.
Source§

impl ToDatabaseComparison<Timestamp, Mongo> for TimeRangeFilter

Available on crate feature mongo only.

The range filter crosses into the range comparison for the one backend this family has, and the header naming Mongo concretely is what keeps it from overlapping the SQL row — see MongoScalarComparison’s own note, where the coherence argument is made.

Source§

type Comparison = MongoTimeRangeComparison

The comparison a filter of this kind crosses into, holding V and lowering for Db.
Source§

impl ToGraphqlInput for Timestamp

Source§

type Input = Timestamp

The wire type one operand of this type crosses on. Read more
Source§

type Error = !

What a refused crossing says. Infallible where a crossing cannot refuse.
Source§

fn cross(input: Self) -> Result<Self, Infallible>

One operand, read off the wire. Read more
Source§

fn carry(operand: &Self) -> Self

One operand, written back onto the wire. Read more
Source§

impl ToGraphqlOutput for Timestamp

Source§

type Output<'a> = &'a Timestamp

The form a value of M crosses into an OUTPUT position as.
Source§

fn to_graphql_output(marked: &Self) -> &Self

That value, in that form. Read more
Source§

impl TryFrom<SystemTime> for Timestamp

Fallible in this direction alone, and by RANGE rather than by precision — see the type’s note. jiff’s own crossing has the same shape and the same reason, so this is a delegation rather than a second policy.

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(time: SystemTime) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
Source§

impl<T> Conv for T

Source§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<Db, T> DialectCursor<Db> for T
where T: CursorValue,

Source§

fn write_cursor_at(&self, out: &mut Vec<u8>)

Append this value’s cursor bytes for Db to out.
Source§

fn read_cursor_at(bytes: &[u8]) -> Option<T>

The value bytes holds at Db, or None where they are not this dialect’s encoding. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> FmtForward for T

Source§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
Source§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
Source§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
Source§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
Source§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
Source§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
Source§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
Source§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
Source§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Fruit for T
where T: Send + Downcast,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> OrderLeaves for T

Source§

type Leaf = T

The value ONE of this type’s order levels compares. Read more
Source§

fn leaf(&self, _: usize) -> Option<T>

The at-th LEAF’s value, or None where this value has none there. Read more
Source§

impl<T> Pipe for T
where T: ?Sized,

Source§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
Source§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
Source§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
Source§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Source§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
Source§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
Source§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
Source§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<K> PositionKey for K
where K: Clone + Eq + Hash + Send + Sync,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> RootKey for T
where T: Clone + Eq + Hash + Send + Sync + 'static,

Source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SearchOptionsFace for T
where T: InputType,

Source§

impl<T> State<Identity> for T

Source§

type Output = T

The type Self projects to.
Source§

impl<T> Tap for T

Source§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
Source§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
Source§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
Source§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
Source§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
Source§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
Source§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
Source§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
Source§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
Source§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
Source§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
Source§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
Source§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> TryConv for T

Source§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WireScore for T
where T: ToGraphqlOutput + Send + Sync + 'static, <T as ToGraphqlOutput>::Output<'a>: for<'a> OutputType,

Source§

type Wire<'a> = <T as ToGraphqlOutput>::Output<'a> where T: 'a

Available on crate feature async-graphql only.
The form this score crosses into, and it is OutputType — the BACKEND’s demand, made where the backend spends the form.
Source§

fn wire_score(&self) -> <T as WireScore>::Wire<'_>

Available on crate feature async-graphql only.
This score, in that form.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more