Skip to main content

ConcreteLiteral

Enum ConcreteLiteral 

Source
pub enum ConcreteLiteral {
    StringLiteral {
        lexical_form: String,
        lang: Option<Lang>,
    },
    DatatypeLiteral {
        lexical_form: String,
        datatype: IriRef,
    },
    NumericLiteral(NumericLiteral),
    DatetimeLiteral(XsdDateTime),
    BooleanLiteral(bool),
    WrongDatatypeLiteral {
        lexical_form: String,
        datatype: IriRef,
        error: String,
    },
}
Expand description

Concrete representation of RDF literals with type-safe internal representations.

This enum provides a strongly-typed representation of RDF literals, using native Rust types (integers, floats, booleans, etc.) internally for efficiency. It also supports literals with incorrect datatypes to enable parsing and validation of potentially malformed RDF data.

§Type Safety

The enum uses native Rust types internally, providing type safety and efficient operations on numeric values. For example, NumericLiteral stores actual numeric values rather than strings, enabling direct mathematical operations.

§Error Handling

The WrongDatatypeLiteral variant allows parsing and representing malformed RDF data (e.g., "hello"^^xsd:integer) without losing information. This enables validation workflows that need to report specific errors while continuing to process other data.

§Comparison and Ordering

Literals implement PartialOrd and Ord following SPARQL ordering rules:

  • String literals are compared lexicographically
  • Numeric literals are compared by numeric value
  • Boolean literals follow false < true
  • Datetime literals are compared chronologically

§Panics

The Ord implementation panics when comparing incomparable literals (e.g., NaN floating-point values or literals with different datatypes). Use PartialOrd when comparing arbitrary literals to avoid panics.

Variants§

§

StringLiteral

A plain string literal, optionally with a language tag.

Fields

§lexical_form: String
§lang: Option<Lang>
§

DatatypeLiteral

A literal with an explicit datatype IRI.

Fields

§lexical_form: String
§datatype: IriRef
§

NumericLiteral(NumericLiteral)

A numeric literal (integer, float, decimal, etc.).

§

DatetimeLiteral(XsdDateTime)

An XSD datetime literal.

§

BooleanLiteral(bool)

A boolean literal (true or false).

§

WrongDatatypeLiteral

Represents a literal with an invalid datatype.

For example, a value like "hello"^^xsd:integer would be represented as a WrongDatatypeLiteral. This is useful for parsing RDF data that may contain malformed literals while still enabling validation.

Fields

§lexical_form: String
§datatype: IriRef
§error: String

Implementations§

Source§

impl ConcreteLiteral

§Display and formatting
Source

pub fn show_qualified(&self, prefixmap: &PrefixMap) -> String

Returns a string representation using the given prefix map to qualify IRIs.

This method formats the literal using shortened IRI prefixes from the provided prefix map, making the output more readable.

§Arguments
  • prefixmap - The prefix map used to shorten IRIs
§Examples
use rudof_rdf::rdf_core::term::literal::ConcreteLiteral;
use prefixmap::PrefixMap;

let lit = ConcreteLiteral::integer(42);
let prefixmap = PrefixMap::basic();
println!("{}", lit.show_qualified(&prefixmap));
Source

pub fn display_qualified<W: Write>( &self, f: &mut W, prefixmap: &PrefixMap, ) -> Result

Formats this literal using the given prefix map and writes the result into the provided formatter.

The output follows RDF/Turtle-style literal syntax:

  • String literals are quoted, with an optional language tag
  • Numeric and boolean literals are written as-is
  • Datatype literals are written using ^^ and qualified IRIs
  • Datatypes are shortened using the provided prefix map when possible

This method is intended for internal use by [show_qualified] and Display implementations rather than being called directly.

§Arguments
  • f - The output writer to which the literal representation is written
  • prefixmap - The prefix map used to qualify datatype IRIs
§Errors

Returns any formatting error encountered while writing to the formatter.

Source§

impl ConcreteLiteral

§Validation and Conversion
Source

pub fn into_checked_literal(self) -> Result<Self, RDFError>

Validates that the lexical form matches the declared datatype, consuming the literal and returning a validated version.

This method checks whether the lexical form of a datatype literal is compatible with its declared datatype. If the validation succeeds, a properly typed literal is returned. If the validation fails, a WrongDatatypeLiteral is returned instead.

For non-datatype literals, the value is returned unchanged.

§Errors

Returns an LiteralError if datatype validation fails.

§Examples
use rudof_rdf::rdf_core::term::literal::ConcreteLiteral;
use iri_s::IriS;
use prefixmap::IriRef;

// Create a datatype literal with an integer value
let dt_iri = IriRef::iri(IriS::new_unchecked("http://www.w3.org/2001/XMLSchema#integer"));
let lit = ConcreteLiteral::lit_datatype("42", &dt_iri);

// Validate the literal
let checked = lit.into_checked_literal().unwrap();
Source

pub fn match_literal(&self, literal_expected: &Self) -> bool

Compares this literal with another for equality.

This method performs type-aware comparison, ensuring that literals of different types are not considered equal even if their lexical forms match.

§Arguments
  • literal_expected - The literal to compare against
§Returns

true if the literals are equal, false otherwise.

§Examples
use rudof_rdf::rdf_core::term::literal::ConcreteLiteral;
use rudof_rdf::rdf_core::term::literal::Lang;

let lit1 = ConcreteLiteral::str("hello");
let lit2 = ConcreteLiteral::str("hello");
let lit3 = ConcreteLiteral::lang_str("hello", Lang::new("en").unwrap());
let lit4 = ConcreteLiteral::integer(42);

// Plain string literals with the same content are equal
assert!(lit1.match_literal(&lit2));

// Language-tagged string literals must match both lexical form and lang
assert!(!lit1.match_literal(&lit3));

// Numeric and string literals are not equal even if lexical forms match
let lit5 = ConcreteLiteral::lit_datatype("42", &lit4.datatype());
assert!(!lit5.match_literal(&lit4));

// Comparing numeric literals of the same value returns true
let lit6 = ConcreteLiteral::integer(42);
assert!(lit4.match_literal(&lit6));
Source§

impl ConcreteLiteral

§Constructor Methods - Numeric Types
Source

pub fn integer(n: i128) -> Self

Creates a literal representing an unbounded integer (i128).

This corresponds to XSD’s xsd:integer type, which is unbounded.

Source

pub fn non_negative_integer(n: u128) -> Self

Creates a literal representing a non-negative integer (u128 ≥ 0).

This corresponds to XSD’s xsd:nonNegativeInteger type.

Source

pub fn non_positive_integer(n: i128) -> Result<Self, RDFError>

Creates a literal representing a non-positive integer (i128 ≤ 0).

This corresponds to XSD’s xsd:nonPositiveInteger type.

§Errors

Returns RDFError::NumericOutOfRange if n is greater than 0.

Source

pub fn positive_integer(n: u128) -> Result<Self, RDFError>

Creates a literal representing a strictly positive integer (u128 > 0).

This corresponds to XSD’s xsd:positiveInteger type.

§Errors

Returns RDFError::NumericOutOfRange if n is 0.

Source

pub fn negative_integer(n: i128) -> Result<Self, RDFError>

Creates a literal representing a strictly negative integer (i128 < 0).

This corresponds to XSD’s xsd:negativeInteger type.

§Errors

Returns RDFError::NumericOutOfRange if n is greater than or equal to 0.

Source

pub fn double(d: f64) -> Self

Creates a literal representing a double-precision floating-point number (f64).

This corresponds to XSD’s xsd:double type (64-bit IEEE 754).

Source

pub fn decimal(d: Decimal) -> Self

Creates a literal representing a decimal number (Decimal type for precise arithmetic).

This corresponds to XSD’s xsd:decimal type for exact decimal arithmetic.

Source

pub fn long(n: i64) -> Self

Creates a literal representing a 64-bit signed long integer (i64).

This corresponds to XSD’s xsd:long type (-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807).

Source

pub fn byte(n: i8) -> Self

Creates a literal representing a signed byte (i8), values -128 to 127.

This corresponds to XSD’s xsd:byte type.

Source

pub fn short(n: i16) -> Self

Creates a literal representing a signed short (i16), values -32,768 to 32,767.

This corresponds to XSD’s xsd:short type.

Source

pub fn unsigned_byte(n: u8) -> Self

Creates a literal representing an unsigned byte (u8), values 0–255.

This corresponds to XSD’s xsd:unsignedByte type.

Source

pub fn unsigned_short(n: u16) -> Self

Creates a literal representing an unsigned short (u16), values 0–65,535.

This corresponds to XSD’s xsd:unsignedShort type.

Source

pub fn unsigned_int(n: u32) -> Self

Creates a literal representing an unsigned integer (u32).

This corresponds to XSD’s xsd:unsignedInt type.

Source

pub fn unsigned_long(n: u64) -> Self

Creates a literal representing an unsigned long integer (u64).

This corresponds to XSD’s xsd:unsignedLong type.

Source

pub fn float(n: f32) -> Self

Creates a literal representing a single-precision floating-point number (f32).

This corresponds to XSD’s xsd:float type (32-bit IEEE 754).

Source

pub fn datetime(dt: XsdDateTime) -> Self

Creates a DatetimeLiteral

Source§

impl ConcreteLiteral

§Constructor Methods - Other Types
Source

pub fn lit_datatype(lexical_form: &str, datatype: &IriRef) -> Self

Creates a literal with a custom datatype.

§Parameters
  • lexical_form: The string representation of the literal’s value.
  • datatype: The IRI that identifies the literal’s datatype.
Source

pub fn boolean(b: bool) -> Self

Creates a boolean literal (true or false).

Source

pub fn str(lexical_form: &str) -> Self

Creates a plain string literal without a language tag.

§Parameters
  • lexical_form: The text content of the literal.
Source

pub fn lang_str(lexical_form: &str, lang: Lang) -> Self

Creates a string literal with a language tag.

§Parameters
  • lexical_form: The text content of the literal.
  • lang: The language of the literal, e.g., "en" for English.
Source§

impl ConcreteLiteral

§Accessor Methods
Source

pub fn lang(&self) -> Option<Lang>

Returns the language tag of the literal, if it is a language-tagged string.

Source

pub fn lexical_form(&self) -> String

Returns the lexical form (string representation) of the literal.

§Returns

A String representing the literal’s value:

  • For string or datatype literals, returns the literal text.
  • For numeric literals, returns the numeric value as a string.
  • For boolean literals, returns "true" or "false".
  • For datetime literals, returns a standard string representation.
Source

pub fn datatype(&self) -> IriRef

Returns the datatype IRI of the literal.

§Returns
  • For explicitly typed literals (DatatypeLiteral or WrongDatatypeLiteral), returns the stored datatype IRI.
  • For plain string literals without a language tag, returns xsd:string.
  • For language-tagged string literals, returns rdf:langString.
  • For numeric literals, returns the appropriate XML Schema datatype (e.g., xsd:integer, xsd:double).
  • For boolean literals, returns xsd:boolean.
  • For datetime literals, returns xsd:dateTime.
Source

pub fn numeric_value(&self) -> Option<NumericLiteral>

Returns the numeric literal value, if this literal is numeric.

Source§

impl ConcreteLiteral

§Parsing Methods
Source

pub fn parse_bool(s: &str) -> Result<bool, String>

Parses a boolean from its XSD lexical representation.

Valid values are: “true”, “false”, “1” (true), “0” (false). Parsing is case-sensitive.

§Errors

Returns an error if the input string is not a valid boolean representation.

§Examples
use rudof_rdf::rdf_core::term::literal::ConcreteLiteral;
assert_eq!(ConcreteLiteral::parse_bool("true").unwrap(), true);
assert_eq!(ConcreteLiteral::parse_bool("0").unwrap(), false);
assert!(ConcreteLiteral::parse_bool("yes").is_err());
Source

pub fn parse_integer(s: &str) -> Result<i128, String>

Parses an integer from its string representation.

XSD integer is unbounded, so this returns i128.

§Errors

Returns an error if the string cannot be parsed as an integer.

§Examples
use rudof_rdf::rdf_core::term::literal::ConcreteLiteral;
assert_eq!(ConcreteLiteral::parse_integer("-7").unwrap(), -7);
assert_eq!(ConcreteLiteral::parse_integer("2").unwrap(), 2);
assert!(ConcreteLiteral::parse_integer("x").is_err());
Source

pub fn parse_negative_integer(s: &str) -> Result<i128, String>

Parses a negative integer from its string representation.

§Errors

Returns an error if the value is not negative or cannot be parsed.

§Examples
use rudof_rdf::rdf_core::term::literal::ConcreteLiteral;
assert_eq!(ConcreteLiteral::parse_negative_integer("-3").unwrap(), -3);
assert!(ConcreteLiteral::parse_negative_integer("0").is_err());
Source

pub fn parse_non_positive_integer(s: &str) -> Result<i128, String>

Parses a non-positive integer from its string representation.

§Errors

Returns an error if the value is positive or cannot be parsed.

Source

pub fn parse_positive_integer(s: &str) -> Result<u128, String>

Parses a positive integer from its string representation.

§Errors

Returns an error if the value is not positive or cannot be parsed.

Source

pub fn parse_non_negative_integer(s: &str) -> Result<u128, String>

Parses a non-negative integer from its string representation.

§Errors

Returns an error if the string cannot be parsed as a non-negative integer.

Source

pub fn parse_unsigned_byte(s: &str) -> Result<u8, String>

Parses an unsigned byte (0–255) from its string representation.

§Errors

Returns an error if the string cannot be parsed as a u8.

Source

pub fn parse_unsigned_short(s: &str) -> Result<u16, String>

Parses an unsigned short (0–65535) from its string representation.

§Errors

Returns an error if the string cannot be parsed as a u16.

Source

pub fn parse_unsigned_int(s: &str) -> Result<u32, String>

Parses an unsigned integer from its string representation.

§Errors

Returns an error if the string cannot be parsed as a u32.

Source

pub fn parse_unsigned_long(s: &str) -> Result<u64, String>

Parses an unsigned long (0–u64::MAX) from its string representation.

§Errors

Returns an error if the string cannot be parsed as a u64.

Source

pub fn parse_double(s: &str) -> Result<f64, String>

Parses a double (64-bit float) from its string representation.

§Errors

Returns an error if the string cannot be parsed as a f64.

Source

pub fn parse_long(s: &str) -> Result<i64, String>

Parses a long integer (64-bit signed) from its string representation.

§Errors

Returns an error if the string cannot be parsed as an i64.

Source

pub fn parse_decimal(s: &str) -> Result<Decimal, String>

Parses a decimal from its string representation using rust_decimal::Decimal.

§Errors

Returns an error if the string cannot be parsed as a Decimal.

Source

pub fn parse_float(s: &str) -> Result<f32, String>

Parses a float (32-bit) from its string representation.

§Errors

Returns an error if the string cannot be parsed as a float.

Source

pub fn parse_byte(s: &str) -> Result<i8, String>

Parses a signed byte (-128 to 127) from its string representation.

§Errors

Returns an error if the string cannot be parsed as an i8.

Source

pub fn parse_short(s: &str) -> Result<i16, String>

Parses a signed short (-32768 to 32767) from its string representation.

§Errors

Returns an error if the string cannot be parsed as an i16.

Source

pub fn parse_datetime(s: &str) -> Result<XsdDateTime, String>

Parses a datetime string using XsdDateTime

Trait Implementations§

Source§

impl Clone for ConcreteLiteral

Source§

fn clone(&self) -> ConcreteLiteral

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConcreteLiteral

Source§

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

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

impl Default for ConcreteLiteral

Source§

fn default() -> Self

Returns an empty string literal without a language tag.

This is used as a neutral default value when a literal is required but no concrete value is available.

Source§

impl DerefIri for ConcreteLiteral

Source§

fn deref_iri( self, base: Option<&IriS>, prefixmap: Option<&PrefixMap>, ) -> Result<Self, DerefError>

Resolves IRIs and prefixes contained in the literal.

  • Value-based literals (NumericLiteral, BooleanLiteral, DatetimeLiteral, StringLiteral) are cloned directly.
  • Datatype literals have their datatype IRIs dereferenced using base and prefixmap.
  • Wrong datatype literals are converted into properly typed literals.
§Errors

Returns DerefError if datatype resolution fails.

Source§

impl<'de> Deserialize<'de> for ConcreteLiteral

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 Display for ConcreteLiteral

Source§

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

Formats the literal using a basic prefix map for qualified display.

Source§

impl From<&ConcreteLiteral> for Literal

Source§

fn from(value: &ConcreteLiteral) -> Self

Converts to this type from the input type.
Source§

impl From<ConcreteLiteral> for Literal

Source§

fn from(value: ConcreteLiteral) -> Self

Converts an SLiteral into an oxrdf::Literal

Source§

impl From<ConcreteLiteral> for Object

Converts a ConcreteLiteral into an Object::Literal.

This allows literals to be seamlessly used where objects are expected.

Source§

fn from(lit: ConcreteLiteral) -> Self

Converts to this type from the input type.
Source§

impl Hash for ConcreteLiteral

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 Ord for ConcreteLiteral

Total ordering for literals.

§Panics

This implementation panics if two literals are not comparable, such as:

  • Literals with different datatypes
  • Numeric literals involving NaN

This is intended as a temporary solution to support sorting in validation workflows where such cases are not expected.

§TODO

Define a total ordering that is well-defined for all literals.

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ConcreteLiteral

Source§

fn eq(&self, other: &ConcreteLiteral) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for ConcreteLiteral

Partial ordering for literals following SPARQL comparison semantics.

Comparison rules:

  • String literals are compared lexicographically by their lexical form.
  • Datatype literals are comparable only if they share the same datatype, and are then compared by lexical form.
  • Numeric literals are compared by numeric value.
  • Boolean literals follow true > false.
  • Datetime literals are compared chronologically.

If two literals are not comparable under these rules, None is returned.

See: https://www.w3.org/TR/sparql11-query/#OperatorMapping

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 · 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 · 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 · 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 · 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 Serialize for ConcreteLiteral

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 TryFrom<Literal> for ConcreteLiteral

Source§

fn try_from(value: Literal) -> Result<Self, Self::Error>

Attempts to convert an oxrdf literal into an SLiteral.

Supported cases:

  • Plain string literals
  • Language-tagged string literals
  • Typed literals (with datatype parsing)
§Errors

Returns an LiteralError if:

  • The language tag is invalid
  • The datatype is unsupported or malformed
  • The literal structure is unknown
Source§

type Error = RDFError

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

impl Eq for ConcreteLiteral

Source§

impl StructuralPartialEq for ConcreteLiteral

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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> 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> ToStringFallible for T
where T: Display,

Source§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,