Skip to main content

GraphcalError

Enum GraphcalError 

Source
pub enum GraphcalError {
Show 112 variants DuplicateName { name: String, src: NamedSource<Arc<String>>, duplicate: SourceSpan, first: SourceSpan, }, BuiltinNameShadowed { kind: &'static str, name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, ConflictingImportedUnit { name: UnitRef, src: NamedSource<Arc<String>>, span: SourceSpan, }, InvalidPlotProperty { property: String, context: &'static str, valid: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, PlotPropertyTypeMismatch { property: &'static str, expected: &'static str, found: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, PlotPropertyDimensioned { property: &'static str, dimension: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, ImportPlotItem { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, HiddenIncludeItemNotAPlot { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownPlotReference { owner_kind: &'static str, owner: ScopedName, name: ScopedName, src: NamedSource<Arc<String>>, span: SourceSpan, }, CompositionReferencesNonPlot { owner_kind: &'static str, actual_kind: &'static str, name: ScopedName, src: NamedSource<Arc<String>>, span: SourceSpan, }, DuplicatePlotReference { owner_kind: &'static str, owner: ScopedName, name: ScopedName, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownGraphRef { name: ScopedName, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownConstRef { name: ScopedName, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownFunction { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, GraphRefInConst { name: ScopedName, src: NamedSource<Arc<String>>, span: SourceSpan, }, GraphRefInConstUnit { name: ScopedName, src: NamedSource<Arc<String>>, span: SourceSpan, }, NonConstUnitInConst { name: UnitRef, src: NamedSource<Arc<String>>, span: SourceSpan, }, GraphRefInFn { name: ScopedName, src: NamedSource<Arc<String>>, span: SourceSpan, help: String, }, RecursiveFunction { name: FnName, src: NamedSource<Arc<String>>, span: SourceSpan, }, WrongArity { name: FnName, expected: usize, got: usize, src: NamedSource<Arc<String>>, span: SourceSpan, }, WrongGenericArity { name: FnName, expected: usize, got: usize, src: NamedSource<Arc<String>>, span: SourceSpan, }, GenericArgMismatch { name: FnName, param: String, expected: String, found: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, CyclicDependency { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, EvalError { message: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, InternalError { message: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, DimensionOverflow { src: NamedSource<Arc<String>>, span: SourceSpan, }, DimensionMismatch { expected: String, found: String, src: NamedSource<Arc<String>>, span: SourceSpan, help: String, }, IndexedShapeMismatch { context: String, lhs: String, rhs: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, DimensionMismatchInAnnotation { declared: String, inferred: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownUnit { name: UnitRef, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownDimension { name: DimName, src: NamedSource<Arc<String>>, span: SourceSpan, }, CyclicDimension { name: DimName, src: NamedSource<Arc<String>>, span: SourceSpan, }, CyclicUnit { name: UnitName, src: NamedSource<Arc<String>>, span: SourceSpan, }, NonLiteralExponent { src: NamedSource<Arc<String>>, span: SourceSpan, }, ConversionDimensionMismatch { target: String, expr_dim: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, NestedConversion { src: NamedSource<Arc<String>>, span: SourceSpan, }, IneffectiveConversion { src: NamedSource<Arc<String>>, span: SourceSpan, }, AffineProneUnitDefinition { dim: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownStructType { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownField { type_name: StructTypeName, field_name: FieldName, src: NamedSource<Arc<String>>, span: SourceSpan, }, MissingFields { type_name: StructTypeName, missing: Vec<FieldName>, src: NamedSource<Arc<String>>, span: SourceSpan, }, ExtraFields { type_name: StructTypeName, extra: Vec<FieldName>, src: NamedSource<Arc<String>>, span: SourceSpan, }, FieldDimensionMismatch { type_name: StructTypeName, field_name: FieldName, expected: String, found: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, NotAStruct { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownLocalRef { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownIndex { name: IndexName, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownVariant { index_name: IndexName, variant_name: IndexVariantName, src: NamedSource<Arc<String>>, span: SourceSpan, }, MissingVariants { index_name: IndexName, missing: Vec<IndexVariantName>, src: NamedSource<Arc<String>>, span: SourceSpan, }, ExtraVariants { index_name: IndexName, extra: Vec<IndexVariantName>, src: NamedSource<Arc<String>>, span: SourceSpan, }, IndexMismatch { expected: IndexName, found: IndexName, src: NamedSource<Arc<String>>, span: SourceSpan, }, FileNotFound { path: String, }, CircularImport { cycle: String, }, ImportFileNotFound { path: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, ImportNameNotFound { name: String, file_path: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, InvalidModuleName { stem: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, DuplicateModuleName { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, first: SourceSpan, }, UnknownModule { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, QualifiedNameNotFound { module: String, name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, RangeIndexDimensionMismatch { name: IndexName, start_dim: String, end_dim: String, step_dim: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, RangeIndexInvalid { name: IndexName, message: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, GraphRefToAssert { name: DeclName, src: NamedSource<Arc<String>>, span: SourceSpan, }, AssertBodyNotBool { found: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, AssumedAssertionFailed { name: DeclName, src: NamedSource<Arc<String>>, span: SourceSpan, help: String, }, UnknownAssertInAssumes { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, InvalidAssumesTarget { kind: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, InvalidHiddenTarget { kind: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownAttribute { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, InvalidExpectedFailTarget { kind: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, ExpectedFailInvalidArg { src: NamedSource<Arc<String>>, span: SourceSpan, }, ExpectedFailNotIndexed { src: NamedSource<Arc<String>>, span: SourceSpan, }, ExpectedFailAllOnIndexed { src: NamedSource<Arc<String>>, span: SourceSpan, }, ExpectedFailDuplicateKey { src: NamedSource<Arc<String>>, span: SourceSpan, }, ExpectedFailKeyShapeMismatch { expected: usize, found: usize, src: NamedSource<Arc<String>>, span: SourceSpan, }, ExpectedFailKeyIndexMismatch { expected: String, found: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, ExpectedFailRangeStepOutOfBounds { step: u64, size: u64, src: NamedSource<Arc<String>>, span: SourceSpan, }, NegativeTolerance { found: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, ImportOutsideRoot { path: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, OverrideNotAParam { name: DeclName, actual_kind: DeclCategory, }, OverrideUnknownParam { name: DeclName, }, RequiredParamNotProvided { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownParamBinding { name: String, file_path: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, BindingNotAParam { name: String, actual_kind: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, InstantiatedImportNeedsNamespace { src: NamedSource<Arc<String>>, span: SourceSpan, }, BareImportWithoutManifest { path: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, PackageNameMismatch { path_first: String, package_name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, StdlibNotImplemented { path: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, ManifestError { message: String, }, CrossFileImportInVirtualPackage { path: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, BindingTargetsIndex { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, IndexBindingNotAnIndex { dep_index: String, value: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, IndexKindMismatch { dep_index: String, dep_kind: String, bound_index: String, bound_kind: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, IndexBindingDimensionMismatch { dep_index: String, expected_dim: String, bound_index: String, found_dim: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, RequiredIndexNotBound { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, ImportRuntimeItem { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, InvalidTimezone { timezone: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, DomainViolation { name: String, value: String, violation: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, DomainDimensionMismatch { name: String, type_dim: String, bound_name: String, bound_dim: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, DomainMinExceedsMax { name: String, min: String, max: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, InvalidDomainTarget { type_kind: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, IntDomainBoundNotUnitless { name: String, bound_name: String, bound_type: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, GenericTypeArgDomainConstraint { src: NamedSource<Arc<String>>, span: SourceSpan, }, ImportPrivateItem { name: String, file_path: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, RequiredItemMustBeBindable { kind: String, name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, PrivateInPublic { pub_kind: String, pub_name: String, ref_kind: String, ref_name: String, src: NamedSource<Arc<String>>, ref_span: SourceSpan, pub_span: SourceSpan, }, PubIndexVariantLiteral { index: String, variant: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, IncludeMustReconcileOverride { overridden: String, overridden_kind: String, orphan_decl: String, detail: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, GenericsLeakage { reexport_kind: String, reexport_name: String, leaked_kind: String, leaked_name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownDag { name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownInlineDagParam { name: String, dag_name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, MissingInlineDagBindings { missing: Vec<String>, dag_name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, UnknownInlineDagOutput { name: String, dag_name: String, src: NamedSource<Arc<String>>, span: SourceSpan, }, InlineDagArgDimensionMismatch { param_name: String, expected: String, found: String, src: NamedSource<Arc<String>>, span: SourceSpan, },
}
Expand description

Rich diagnostic error types for graphcal evaluation.

Variants§

§

DuplicateName

Fields

§name: String
§duplicate: SourceSpan
§

BuiltinNameShadowed

Fields

§kind: &'static str
§name: String
§

ConflictingImportedUnit

§

InvalidPlotProperty

Fields

§property: String
§context: &'static str
§valid: String

Preformatted help listing the valid property set for context.

§

PlotPropertyTypeMismatch

Fields

§property: &'static str
§expected: &'static str
§found: String
§

PlotPropertyDimensioned

Fields

§property: &'static str
§dimension: String
§

ImportPlotItem

§

HiddenIncludeItemNotAPlot

§

UnknownPlotReference

Fields

§owner_kind: &'static str
§

CompositionReferencesNonPlot

Fields

§owner_kind: &'static str
§actual_kind: &'static str
§

DuplicatePlotReference

Fields

§owner_kind: &'static str
§

UnknownGraphRef

§

UnknownConstRef

§

UnknownFunction

§

GraphRefInConst

§

GraphRefInConstUnit

§

NonConstUnitInConst

§

GraphRefInFn

§

RecursiveFunction

§

WrongArity

Fields

§name: FnName
§expected: usize
§got: usize
§

WrongGenericArity

Fields

§name: FnName
§expected: usize
§got: usize
§

GenericArgMismatch

Fields

§name: FnName
§param: String
§expected: String
§found: String
§

CyclicDependency

§

EvalError

Fields

§message: String
§

InternalError

An internal invariant violation that should never be reached if earlier compiler phases (parsing, resolution, dim_check) are correct.

Fields

§message: String
§

DimensionOverflow

§

DimensionMismatch

Fields

§expected: String
§found: String
§help: String
§

IndexedShapeMismatch

Fields

§context: String
§

DimensionMismatchInAnnotation

Fields

§declared: String
§inferred: String
§

UnknownUnit

§

UnknownDimension

§

CyclicDimension

§

CyclicUnit

§

NonLiteralExponent

§

ConversionDimensionMismatch

Fields

§target: String
§expr_dim: String
§

NestedConversion

§

IneffectiveConversion

§

AffineProneUnitDefinition

§

UnknownStructType

§

UnknownField

Fields

§type_name: StructTypeName
§field_name: FieldName
§

MissingFields

Fields

§type_name: StructTypeName
§missing: Vec<FieldName>
§

ExtraFields

§

FieldDimensionMismatch

Fields

§type_name: StructTypeName
§field_name: FieldName
§expected: String
§found: String
§

NotAStruct

§

UnknownLocalRef

§

UnknownIndex

§

UnknownVariant

Fields

§index_name: IndexName
§variant_name: IndexVariantName
§

MissingVariants

Fields

§index_name: IndexName
§

ExtraVariants

§

IndexMismatch

Fields

§expected: IndexName
§

FileNotFound

Fields

§path: String
§

CircularImport

Fields

§cycle: String
§

ImportFileNotFound

§

ImportNameNotFound

Fields

§name: String
§file_path: String
§

InvalidModuleName

§

DuplicateModuleName

§

UnknownModule

§

QualifiedNameNotFound

Fields

§module: String
§name: String
§

RangeIndexDimensionMismatch

Fields

§start_dim: String
§end_dim: String
§step_dim: String
§

RangeIndexInvalid

Fields

§message: String
§

GraphRefToAssert

§

AssertBodyNotBool

Fields

§found: String
§

AssumedAssertionFailed

§

UnknownAssertInAssumes

§

InvalidAssumesTarget

§

InvalidHiddenTarget

§

UnknownAttribute

§

InvalidExpectedFailTarget

§

ExpectedFailInvalidArg

§

ExpectedFailNotIndexed

§

ExpectedFailAllOnIndexed

§

ExpectedFailDuplicateKey

§

ExpectedFailKeyShapeMismatch

Fields

§expected: usize
§found: usize
§

ExpectedFailKeyIndexMismatch

Fields

§expected: String
§found: String
§

ExpectedFailRangeStepOutOfBounds

Fields

§step: u64
§size: u64
§

NegativeTolerance

Fields

§found: String
§

ImportOutsideRoot

§

OverrideNotAParam

Fields

§actual_kind: DeclCategory
§

OverrideUnknownParam

Fields

§

RequiredParamNotProvided

§

UnknownParamBinding

Fields

§name: String
§file_path: String
§

BindingNotAParam

Fields

§name: String
§actual_kind: String
§

InstantiatedImportNeedsNamespace

§

BareImportWithoutManifest

§

PackageNameMismatch

Fields

§path_first: String
§package_name: String
§

StdlibNotImplemented

§

ManifestError

Fields

§message: String
§

CrossFileImportInVirtualPackage

§

BindingTargetsIndex

§

IndexBindingNotAnIndex

Fields

§dep_index: String
§value: String
§

IndexKindMismatch

Fields

§dep_index: String
§dep_kind: String
§bound_index: String
§bound_kind: String
§

IndexBindingDimensionMismatch

Fields

§dep_index: String
§expected_dim: String
§bound_index: String
§found_dim: String
§

RequiredIndexNotBound

A required index was not bound via parameterized import.

Required indexes (index Foo;, index Foo: Time;) must be bound when the file is imported. They cannot be evaluated standalone.

§

ImportRuntimeItem

§

InvalidTimezone

Fields

§timezone: String
§

DomainViolation

Fields

§name: String
§value: String
§violation: String
§

DomainDimensionMismatch

Fields

§name: String
§type_dim: String
§bound_name: String
§bound_dim: String
§

DomainMinExceedsMax

§

InvalidDomainTarget

Fields

§type_kind: String
§

IntDomainBoundNotUnitless

Fields

§name: String
§bound_name: String
§bound_type: String
§

GenericTypeArgDomainConstraint

§

ImportPrivateItem

Attempting to import a private (non-pub) item from another file.

Fields

§name: String
§file_path: String
§

RequiredItemMustBeBindable

A required index, type, or dim is not marked pub(bind).

param is excluded: required param is implicitly bindable (A5); it never carries a visibility annotation.

§

PrivateInPublic

A visible declaration references a private type-system item in its written signature (A9 case 1).

The pub_kind string is the declaration kind (e.g. "param", "pub node", "pub type"). param is always visible (A5 §4.0) and never carries an explicit annotation.

Fields

§pub_kind: String
§pub_name: String
§ref_kind: String
§ref_name: String
§ref_span: SourceSpan
§pub_span: SourceSpan
§

PubIndexVariantLiteral

A pub(bind) index with concrete variants has its variants used in a non-bindable body (node / const) or a public sink declaration in the defining file.

Per axiom A10(c) / A10(b), a bindable index’s variant literals must not appear in bodies that cannot themselves be re-bound by importers (the defining library must abstract over the index).

Fields

§index: String
§variant: String
§

IncludeMustReconcileOverride

An include overrides a bindable symbol s, but some kept declaration’s body or default mentions a name nominally tied to s and was not itself re-bound by the same include statement (A8).

Nominally-tied mentions today are: variant literals s.v for an overridden index, and constructors / field accesses of s for an overridden type. dim and param overrides are vacuous for A8 — their substitution is total — so they never trigger this error.

Fields

§overridden: String
§overridden_kind: String
§orphan_decl: String
§detail: String
§

GenericsLeakage

A pub include / pub import (or selective { pub items }) re-exports a declaration whose effective (post-substitution) signature mentions a symbol that is V = private at the importing site — A9 case 2 / visibility composition.

Concretely: an include binding renames a bindable symbol s in the dep to a name that is private at the importer, and the re-exported surface of the include carries that name into the importer’s public API. Downstream consumers of the importer would see a signature referring to a symbol they cannot name.

Fields

§reexport_kind: String
§reexport_name: String
§leaked_kind: String
§leaked_name: String
§

UnknownDag

§

UnknownInlineDagParam

Fields

§name: String
§dag_name: String
§

MissingInlineDagBindings

Fields

§missing: Vec<String>
§dag_name: String
§

UnknownInlineDagOutput

Fields

§name: String
§dag_name: String
§

InlineDagArgDimensionMismatch

Fields

§param_name: String
§expected: String
§found: String

Implementations§

Source§

impl GraphcalError

Source

pub const fn named_source(&self) -> Option<&NamedSource<Arc<String>>>

Return the NamedSource embedded in this error, if any.

Most variants carry a #[source_code] field naming the file and its full source text. Exposing it as a typed accessor lets diagnostic emitters pair the error’s offsets with the exact source they index into — instead of inferring (name, source) from external context, which can silently desynchronize when an imported file is the origin.

Returns None for the handful of variants that represent errors without a source location: file-system errors before parsing (Self::FileNotFound, Self::CircularImport, Self::ManifestError) and CLI override errors (Self::OverrideNotAParam, Self::OverrideUnknownParam).

Trait Implementations§

Source§

impl Clone for GraphcalError

Source§

fn clone(&self) -> GraphcalError

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 GraphcalError

Source§

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

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

impl Diagnostic for GraphcalError

Source§

fn code(&self) -> Option<Box<dyn Display + '_>>

Unique diagnostic code that can be used to look up more information about this Diagnostic. Ideally also globally unique, and documented in the toplevel crate’s documentation for easy searching. Rust path format (foo::bar::baz) is recommended, but more classic codes like E0123 or enums will work just fine.
Source§

fn help(&self) -> Option<Box<dyn Display + '_>>

Additional help text related to this Diagnostic. Do you have any advice for the poor soul who’s just run into this issue?
Source§

fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>

Labels to apply to this Diagnostic’s Diagnostic::source_code
Source§

fn source_code(&self) -> Option<&dyn SourceCode>

Source code to apply this Diagnostic’s Diagnostic::labels to.
Source§

fn severity(&self) -> Option<Severity>

Diagnostic severity. This may be used by ReportHandlers to change the display format of this diagnostic. Read more
Source§

fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>

URL to visit for a more detailed explanation/help about this Diagnostic.
Source§

fn related<'a>( &'a self, ) -> Option<Box<dyn Iterator<Item = &'a dyn Diagnostic> + 'a>>

Additional related Diagnostics.
Source§

fn diagnostic_source(&self) -> Option<&dyn Diagnostic>

The cause of the error.
Source§

impl Display for GraphcalError

Source§

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

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

impl Error for GraphcalError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. 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> AsErrorSource for T
where T: Error + 'static,

Source§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers.
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> 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.