Skip to main content

Label

Struct Label 

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

A CLASSIFICATION’S WORD — what a detector, a classifier or a tagger says a thing IS.

A Utf8Bytes underneath, and a different type for the reason every newtype in primitives is one: it carries an INVARIANT its representation cannot state. A label is a word somebody said, and nothing at all is not one — so new is the only way in and it refuses the empty case.

§THE ENGINE OWNS NORMALISATION, AND THIS TYPE OWNS EXISTENCE

This type does not fold case, and it never will. The division is the producer’s, stated in avanalyze’s own contract: the engine lowercases and trims image-classification labels but passes animal labels through verbatim, and uses the literal "person" for human subjects — the label vocabulary is Apple’s, not this crate’s. One producer therefore emits cat and Golden Retriever from the same run, deliberately, and a type that lowercased them both would be a type overruling the engine about a vocabulary the engine owns.

So Cat and cat are TWO labels here. A caller that wants them to be one asks with containsNocase or eqNocase’s neighbours on TextFilter, which is where a case question belongs: a QUERY’s, asked per query, rather than a value’s, decided once for everybody at a constructor.

§WHAT IS REFUSED, and it is one rule

A label that is empty, or that is nothing but whitespace. The second clause is the first one read honestly: " " is a string a producer sent by accident, it names nothing, and admitting it would put a row in a table whose label no query can ever match and no reader can ever see.

The whitespace is a PREDICATE and never a transform. Label::new(" cat ") succeeds and holds " cat " — the six characters it was handed, byte for byte. That is the division above kept where it would have been easiest to bend: trimming is normalisation, normalisation is the engine’s, and this crate has no trim-at-a-constructor anywhere else either. What the trim decides is whether there is a word here, not what the word is.

It follows that a value this crate wrote reads back byte for byte at every door — the decode, the cursor and the document all re-enter new, and a constructor that rewrites nothing admits exactly what it was given.

§NO VOCABULARY, and that is the ruling rather than an omission

A label is an OPEN word. Every model ships its own roster — Apple’s image classifier, a zero-shot tagger, a barcode symbology reader — the rosters disagree, and none of them is a standard this crate could hold a table of. So there is no enum here and none is coming: an #[ingraph::enumerate] vocabulary over a model’s output would be a closed surface over an open world, which is the one shape this framework does not build. See lang, where the opposite case is argued — a language IS a standard, so it IS a type family.

§Examples

use ingraph::Label;

assert_eq!(Label::new("golden retriever").unwrap().as_str(), "golden retriever");

// Case is the ENGINE's, so two spellings are two labels.
assert_ne!(Label::new("Cat").unwrap(), Label::new("cat").unwrap());

// The whitespace decides whether there is a word, and never what the word is.
assert!(Label::new("").is_err());
assert!(Label::new("   ").is_err());
assert_eq!(Label::new("  cat  ").unwrap().as_str(), "  cat  ");

Implementations§

Source§

impl Label

Source

pub fn new(text: impl Into<Utf8Bytes>) -> Result<Self, EmptyLabel>

Construct a label, or refuse a value that is not one.

Takes anything the crate’s text carrier is built from — a &str, a String, a Utf8Bytes already in hand — so a caller holding an owned word hands it over rather than copying it, and Label::new(Utf8Bytes::from_static("person")) is the door a compile-time word takes with no allocation at all.

§Errors

EmptyLabel where the text is empty or holds nothing but whitespace. It is the only refusal this type has — see the type’s note, where the case question is answered.

Source

pub fn as_str(&self) -> &str

The word, as text.

Source

pub fn into_inner(self) -> Utf8Bytes

The word, as the carrier it is held in.

Trait Implementations§

Source§

impl AsRef<str> for Label

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<'a, R: Row> Assemble<'a, R> for Label
where String: Assemble<'a, R>,

Available on crate feature sqlx only.

AND THE WORD BACK IN, through the constructor rather than around it.

A database is exactly the place that can hand back a value this type says cannot exist — a hand-written UPDATE, a restore, a column shared with something else — so the read refuses rather than substituting a placeholder. That is Count’s posture at its own column and every subtag’s at theirs: loudly, at the row that held it, never a value quietly minted around the hole.

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 Label
where Db: Database, String: Carrier<Db>,

Available on crate feature sqlx only.

ONE BIND OUT — the word, as text.

An OWNED String rather than the borrowed &str the slot already holds, and the reason is sqlx::QueryBuilder’s own lifetime rather than a preference: push_bind requires its value to outlive the builder’s 'args, which this trait’s signature leaves unrelated to &self, so a borrow of self cannot satisfy it. That is the same copy every text newtype in primitives pays at this seat.

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 Label

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 ColumnEq for Label

Source§

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

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

impl ColumnKind for Label

ONE column, which is the default — stated rather than inherited, because the two composites in this house read their own widths off this row and a reader auditing them should find the answer here rather than the absence of one.

Source§

const SEGMENTS: &'static [ColumnShape] = _

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 CursorValue for Label

THE KEYSET POSITION: the word’s UTF-8 bytes, which is byte for byte what Utf8Bytes’ own row writes — so a label column and a text column page past the same cursor.

No framing is added, and none may be: a cursor slot is already length-delimited by the layer above, so a row for a variable-width value writes the value and nothing else. The read RE-VALIDATES because a cursor is a string a CLIENT hands back — a forged empty position is refused rather than turned into a label whose type says it cannot exist.

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 Label

The word QUOTED, under the type’s own name — which is what makes a whitespace-carrying label visible in a test failure instead of vanishing into the alignment.

Source§

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

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

impl DefaultMarker for Label

The interpretation a Label field is read under — the TEXT family’s, which is what puts Option<Label> on the isNull road rather than on a collection’s.

Source§

type Marker = StringMarker<Label>

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

impl Display for Label

The word itself, with nothing around it.

Source§

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

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

impl Eq for Label

Source§

impl From<Label> for Utf8Bytes

The label, as the carrier it holds.

ONE direction, which is the type’s whole subject: From<Utf8Bytes> for Label would say that any text IS a label, and the empty string is the counter-example this newtype exists to keep out of a row. Minting one is Label::new, where the caller meets the refusal.

Source§

fn from(label: Label) -> Self

Converts to this type from the input type.
Source§

impl From<Label> for String

What gives String: TryFrom<Label> through std’s blanket, which is the crossing a TEXT column’s comparison makes — and it makes it with Error = Infallible, a label being valid text by construction.

Source§

fn from(label: Label) -> Self

Converts to this type from the input type.
Source§

impl FromStr for Label

Source§

type Err = EmptyLabel

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 Label

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 MongoCarrier for Label

Available on crate feature mongo only.

THE DOCUMENT’S FORM: a BSON String — the same text the TEXT column above binds, at the one BSON type that holds it.

A label is ONE WORD, so there is nothing here of a composite’s key-set question. This row is the FILTER OPERAND’s form and not a serde row, which is the posture every storage type this crate ships takes — see Timestamp’s, where the E0277 a bare column earns at a declaration is named.

Source§

fn to_bson(&self) -> Bson

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

impl MongoExtract for Label

Available on crate feature mongo only.

THE READ: the same word, back through the door — MongoCarrier’s mirror.

A string field is exactly as untrusted as the TEXT column Assemble above reads: nothing stops a document holding "", one written before this type existed, or one written by hand for a test. So the read goes through Label::new rather than wrapping the bytes.

Source§

const BSON: &'static str = "string"

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 Label

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 PartialEq for Label

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 Label

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<Db> StoredAs<Db> for Label
where String: StoredAs<Db>,

THE STORED WORD is text’s, in every dialect that has one.

Delegated to String rather than named, for the reason the bind below is: a label IS its text, so the column is a text column and the dialect’s own word for one is the only answer. The delegation carries the ADMISSION with it — a label is declarable exactly where text is, which is everywhere.

The non-emptiness is kept by the DECODE rather than by the schema; no dialect here has a CHECK this crate emits. See the assemble row below, which refuses.

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 StringFilterMarker for Label

The TEXT reading, which is what an open vocabulary earns.

A label takes the twenty-slot TextFilter rather than the eight-slot ScalarFilter the lang subtags take, and the difference is what the two words ARE. A subtag is one token of a closed grammar, so does it start with is a question about spelling rather than about meaning. A label is FREE TEXT from a model’s own roster — golden retriever, traffic light, person — so contains: "retriever" is a real question a real client asks, and the nocase half of every affix slot is where the case this type refuses to fold gets asked about instead.

The lexical ORDERING slots come with the kind and they are honest here: text has a byte order, Utf8Bytes publishes a filter carrying gt/gte/lt/lte over exactly that order, and the non-emptiness rule disturbs none of it. A label column is an ORDER SUBJECT in the same breath — see the CursorValue row above, which is what a page walks.

Source§

type Filter = TextFilter<Label, LabelWire>

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

impl StructuralPartialEq for Label

Source§

impl TextWire<Label> for LabelWire

Source§

const NAME: &'static str = "LabelFilter"

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

type Carrier = String

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

type Error = EmptyLabel

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

fn cross(carrier: String) -> Result<Label, Self::Error>

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

fn carry(operand: &Label) -> String

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

impl ToGraphqlInput for Label

Available on crate feature async-graphql only.

THE CROSSING IN — a label arrives as the roster’s own String, and the non-emptiness is kept HERE.

No #[Scalar] of its own, and the absence is NormCoord’s ruling one house over rather than an omission: a named scalar has to say something the roster does not, and what a Label scalar would have said is NON-EMPTY — a constructor’s promise rather than a grammar, which a client can act on nowhere. So a label column and a plain text column publish one SDL scalar, the rule reaches a reader through the FIELD’s documentation, and every operand reaches it through Label::new, which this row calls.

Source§

type Input = String

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

type Error = EmptyLabel

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

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

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

fn carry(operand: &Self) -> String

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

impl ToGraphqlOutput for Label

Available on crate feature async-graphql only.

AND OUT, mirroring the row above so the two directions cannot come to disagree.

A BORROW of the text rather than of the value, which is Utf8Bytes’ own bargain at this seat: the label has no scalar to be returned as, so what a field yields is the string it holds.

Source§

type Output<'a> = &'a str

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

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

That value, in that form. Read more

Auto Trait Implementations§

§

impl !Freeze for Label

§

impl RefUnwindSafe for Label

§

impl Send for Label

§

impl Sync for Label

§

impl Unpin for Label

§

impl UnsafeUnpin for Label

§

impl UnwindSafe for Label

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Searchable for T
where T: AsRef<str> + ?Sized,

Source§

fn write(&self, into: &mut BoxWriter)

Push this value into into as ONE segment.
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