Skip to main content

QuotedTriplesSignal

Struct QuotedTriplesSignal 

Source
pub struct QuotedTriplesSignal {
    pub present: bool,
    pub export_surfaces: Vec<String>,
    pub export_default: Option<String>,
}
Expand description

Whether the file contains quoted triples — statements standing inside other statements — and, if it does, what a consumer gets when they export it.

This is the question “will I meet triple terms in this dataset, and in which spelling?”, which a consumer needs answered before they download a 50 GB file and run rete export on it. The two surfaces are not interchangeable downstream: an RDF 1.2 parser rejects <<s p o>> in N-Quads and silently reads it as a reifier in Turtle/TriG, and an RDF-star parser rejects <<( s p o )>> everywhere. Which one a dump carries decides whether it loads at all, so it belongs in the card rather than in the reader’s memory of a CLI flag.

Measured at read time from the header, never stored, exactly like TextIndexSignal and PermutationsSignal, and for the sharpest version of the same reason: header flag bit 2 (FLAG_HAS_QUOTED_TRIPLES) has been written by every build since quoted triples were supported, so this is an honest answer for every file that already exists — the 44 published datasets included — with no re-card and no rebuild. A stored copy would be null on all of them, which is worse than nothing: it would assert “unknown” about files whose own header knows.

None therefore means unknown — a card read out of a saved JSON document, with no file to measure — and never “no quoted triples”.

There is deliberately no count. The header carries presence, not cardinality, and counting would mean decoding the dictionary — outside the CARD tier’s budget (header + metadata, never the dictionary), and available only to files built after this existed, which is the failure mode above.

Fields§

§present: bool

Does the file hold at least one quoted triple as a dictionary term?

§export_surfaces: Vec<String>

The surfaces rete export can write them in, most interoperable first. Empty when present is false: the question does not arise.

§export_default: Option<String>

Which of export_surfaces rete export writes with no flag. None when present is false.

Implementations§

Source§

impl QuotedTriplesSignal

Source

pub fn probe(header: &Header) -> Self

Read it straight off the parsed header — flag bit 2, in the 1 KiB every card read has already fetched. No range read of any kind.

Source

pub fn describe(&self) -> Option<String>

One line for the human catalog view, or None when there is nothing to say — most datasets have no quoted triples, and a card should not grow a line per affordance they do not use.

Trait Implementations§

Source§

impl Clone for QuotedTriplesSignal

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 Debug for QuotedTriplesSignal

Source§

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

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

impl<'de> Deserialize<'de> for QuotedTriplesSignal

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for QuotedTriplesSignal

Source§

impl PartialEq for QuotedTriplesSignal

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 Serialize for QuotedTriplesSignal

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for QuotedTriplesSignal

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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, 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