Skip to main content

Artifact

Struct Artifact 

Source
pub struct Artifact {
    pub name: Ident,
    pub family: Path,
    pub data: Option<ArtifactBytes>,
    pub required: bool,
}
Expand description

One ARTIFACT position: a blob family derived from this record’s messages, under the name this record answers an address for it by.

Derived’s reverse-container sibling, and it exists on the ENTITY for a reason that is about COHERENCE rather than taste. The address is a field of THIS record’s wire face, so somebody’s expansion has to write it; a blob node’s own macro writing a field into a #[Object] it does not own is the impl-collision wall, measured. The owning expansion writes it into its own object, and the wall never arises — which is only possible if the declaration that names the family is the one being expanded, and that is this word.

There is no Rust field for one, as there is none for a reverse position: the record carries no column holding an artifact, because the artifact is somebody else’s storage and its address is rendered from the key this record already has.

Fields§

§name: Ident

The position’s name — the word the declaration minted, which is the name the wire face exposes the address under.

The author’s own DOMAIN word and never a keyword of this grammar: thumb, cover, poster. One record may answer for several families and each one names itself, which is what makes the word a name rather than a vocabulary — nothing here decides what an artifact is CALLED, because nothing here knows what the artifacts are.

Held to the same namespace as the record’s fields and its reverse positions: an entry that repeats either is refused by the front end, because one face has one namespace.

§family: Path

The blob node this position addresses, exactly as the declaration spelled it.

The path to the #[ingraph::blob] STRUCT and never to a field inside it: a family is named by its type, because the type is what holds the store, the extension and the key the address is rendered from. That is also why there is no second option beside it — where a reverse position may need field = "…" to say which of several ref columns it means, an artifact family has exactly one upstream and therefore nothing to choose between.

A PATH rather than a resolved type, for Derived::source’s reason: every consequence of it is type-level, so an alias in the path is transparent and nothing here has to know what it resolves to.

§data: Option<ArtifactBytes>

The data ASK — locate(thumb(family = "…", data)) — or None where the position asks for the address alone.

The ASK is here and the PERMIT is on the family, and each word decides what only it can. A GraphQL field’s presence is a fact of the expansion writing the #[Object] block, which is this record’s, so the family’s own data word could not put a field anywhere however it was read; what it does is bind ArtifactData, and what this one does is ask for the field that spends it. A position asking where the family never permitted is E0277 at the emitted projection, carrying that trait’s own sentence — which points both ways, because either half is the fix.

§required: bool

locate(cover(family = "…", required)) — whether the ADDRESS field is BlobLocation! rather than BlobLocation.

§NULLABLE IS THE DEFAULT TRUTH here, and the word is the author’s informed promotion

ArtifactBytes::required’s meaning at the position’s own grain, and the two spell ONE word because they answer one question about two fields. The address is nullable by ARCHITECTURE: artifacts are written by the indexing pipeline asynchronously after the entity exists, so not yet generated is a normal state, and the nullable field is the one telling the truth about it.

What the word buys is the deployment where that is not so — a family whose objects are present by read time, served to clients that would rather branch on an error than on a null. That is the AUTHOR’s to declare and not this framework’s to guess, so the word is one-way: writing it is the signature, and not writing it is the default it reverses.

It is a SIGNATURE and not a check — nothing here goes and verifies a deployment’s claim — and it is not free of consequence either. A store answers None for an object that is not there, and a non-null field has nowhere to put one, so the signed position converts that absence into a named field error QUOTING THIS WORD while the bare position beside it publishes null. What the word does not change is the ERROR road: a resolver answering Err is dropped from the response whatever the field’s type. ingraph/tests/artifact_absence.rs executes the absence road at both spellings, and ingraph/tests/artifact_address_signature.rs the error road.

A bare bool beside the ask’s Option rather than a shape pairing the two: the fields are independent — a position may sign for the address, for the bytes, for both or for neither — and one wrapper over both would say they move together.

Trait Implementations§

Source§

impl Clone for Artifact

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 Artifact

Source§

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

Formats the value using the given formatter. Read more

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<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> 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> 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.