Skip to main content

ArtifactBytes

Struct ArtifactBytes 

Source
pub struct ArtifactBytes { /* private fields */ }
Expand description

The wire field one artifact position’s data ask mints.

§It carries a NAME and nothing else, and the absent name is the DEFAULT

<domain-word>Data — thumb → thumbData — in the framework’s own camelCase, resolved at the wire face where that rule has its one home. The alternative was resolving it in the front end and storing a string, which would put a second authority on what a client sees beside emit::wire::wire_member; the two would then be free to disagree about a word like key_frame.

So None is nothing was written rather than nothing is known, exactly as Graphql::output’s empty rename is.

Implementations§

Source§

impl ArtifactBytes

Source

pub const fn asked() -> Self

The BARE ask — the data form, whose field is named at the face.

Written out rather than reached through Default, because the ask with no name is a state this type has and not the absence of one: a reader of ArtifactBytes::default() would have to go and look up which of the two forms it stands for.

Source

pub const fn named(name: String) -> Self

The ask WITH a name — the data = "…" form.

Source

pub fn name(&self) -> Option<&str>

The name a declaration wrote, or None where the default stands.

Verbatim, and never camelCased: a name a declaration CHOSE is that declaration’s, and applying the backend’s rename rule to it would be this framework overriding the choice. The same fork emit::wire::wire_field makes for a column’s own rename, one face over.

Source

pub const fn require(self) -> Self

The same ask, marked NON-NULL — the data(required) form.

A consuming builder rather than a fourth constructor, because required is orthogonal to the two forms above: it composes with the bare ask and with the named one alike, and a constructor per combination is four names for two facts.

Source

pub const fn required(&self) -> bool

Whether the emitted field is String!.

Trait Implementations§

Source§

impl Clone for ArtifactBytes

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 ArtifactBytes

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.