Skip to main content

JsonLdNode

Struct JsonLdNode 

Source
pub struct JsonLdNode {
    pub id: Option<JsonLdLenient<Id>>,
    pub types: Option<BTreeIndexMultiSet<JsonLdLenient<Id>>>,
    pub graph: Option<JsonLdGraph>,
    pub included: Option<JsonLdIncluded>,
    pub properties: JsonLdProperties,
    pub reverse_properties: Option<JsonLdReverseProperties>,
}
Expand description

Node object.

A node object represents zero or more properties of a node in the graph serialized by a JSON-LD document. A node is defined by its identifier (@id field), types, properties and reverse properties. In addition, a node may represent a graph (@graph field) and includes nodes (@included field).

Fields§

§id: Option<JsonLdLenient<Id>>

Identifier.

This is the @id field.

§types: Option<BTreeIndexMultiSet<JsonLdLenient<Id>>>

Types.

This is the @type field.

§graph: Option<JsonLdGraph>

Associated graph.

This is the @graph field.

§included: Option<JsonLdIncluded>

Included nodes.

This is the @included field.

§properties: JsonLdProperties

Properties.

Any non-keyword field.

§reverse_properties: Option<JsonLdReverseProperties>

Reverse properties.

This is the @reverse field.

Implementations§

Source§

impl JsonLdNode

Source

pub fn new() -> Self

Creates a new empty node.

Source

pub fn new_with_id(id: Option<JsonLdLenient<Id>>) -> Self

Creates a new empty node.

Source

pub fn new_graph(id: JsonLdLenient<Id>, graph: JsonLdGraph) -> Self

Creates a new graph node.

Source

pub fn reverse_properties_mut_or_default( &mut self, ) -> &mut JsonLdReverseProperties

Returns a mutable reference to the reverse properties of the node.

If no @reverse entry is present, one is created.

Source

pub fn included_mut_or_default(&mut self) -> &mut JsonLdIncluded

Returns a mutable reference to the included nodes.

If no @included entry is present, one is created.

Source

pub fn as_iri(&self) -> Option<&Iri>

Get the node’s as an IRI if possible.

Returns the node’s IRI id if any. Returns None otherwise.

Source

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

Get the node’s id, is any, as a string slice.

Returns None if the node has no @id field.

Source

pub fn has_type<U>(&self, ty: &U) -> bool

Checks if the node has the given type.

Source

pub fn is_empty(&self) -> bool

Tests if the node is empty.

It is empty is every field other than @id is empty.

Source

pub fn is_graph(&self) -> bool

Tests if the node is a graph object (has a @graph field, and optionally an @id field). Note that node objects may have a @graph entry, but are not considered graph objects if they include any other entries other than @id.

Source

pub fn is_simple_graph(&self) -> bool

Tests if the node is a simple graph object (a graph object without @id field)

Source

pub fn graph(&self) -> Option<&JsonLdGraph>

If the node is a graph object, get the graph.

Source

pub fn graph_mut(&mut self) -> Option<&mut JsonLdGraph>

If the node is a graph object, get the mutable graph.

Source

pub fn graph_entry(&self) -> Option<&JsonLdGraph>

If the node is a graph object, get the graph.

Source

pub fn graph_entry_mut(&mut self) -> Option<&mut JsonLdGraph>

If the node is a graph object, get the mutable graph.

Source

pub fn set_graph_entry(&mut self, graph: Option<JsonLdGraph>)

Set the graph.

Source

pub fn included_entry(&self) -> Option<&JsonLdIncluded>

Get the set of nodes included by this node.

This correspond to the @included field in the JSON representation.

Source

pub fn included_entry_mut(&mut self) -> Option<&mut JsonLdIncluded>

Get the mutable set of nodes included by this node.

This correspond to the @included field in the JSON representation.

Source

pub fn included(&self) -> Option<&JsonLdIncluded>

Returns a reference to the set of @included nodes.

Source

pub fn included_mut(&mut self) -> Option<&mut JsonLdIncluded>

Returns a mutable reference to the set of @included nodes.

Source

pub fn set_included(&mut self, included: Option<JsonLdIncluded>)

Set the set of nodes included by the node.

Source

pub fn properties(&self) -> &JsonLdProperties

Returns a reference to the properties of the node.

Source

pub fn properties_mut(&mut self) -> &mut JsonLdProperties

Returns a mutable reference to the properties of the node.

Source

pub fn reverse_properties(&self) -> Option<&JsonLdReverseProperties>

Returns a reference to the properties of the node.

Source

pub fn reverse_properties_entry(&self) -> Option<&JsonLdReverseProperties>

Returns a reference to the reverse properties of the node.

Source

pub fn reverse_properties_mut(&mut self) -> Option<&mut JsonLdReverseProperties>

Returns a mutable reference to the reverse properties of the node.

Source

pub fn set_reverse_properties( &mut self, reverse_properties: Option<JsonLdReverseProperties>, )

Source

pub fn is_unnamed_graph(&self) -> bool

Tests if the node is an unnamed graph object.

Returns true is the only field of the object is a @graph field. Returns false otherwise.

Source

pub fn into_unnamed_graph(self) -> Result<JsonLdGraph, Self>

Returns the node as an unnamed graph, if it is one.

The unnamed graph is returned as a set of indexed objects. Fails and returns itself if the node is not an unnamed graph.

Source

pub fn entries(&self) -> JsonLdNodeEntries<'_> ⓘ

Source

pub fn has_key(&self, key: &JsonLdTerm) -> bool

Checks if the node object has the given term as key.

§Example
use json_ld::{JsonLdNode, JsonLdTerm};
use json_ld::syntax::JsonLdKeyword;

let node = JsonLdNode::new();

// Checks if the JSON object representation of the node has an `@id` key.
if node.has_key(&JsonLdTerm::Keyword(JsonLdKeyword::Id)) {
  // ...
}
Source

pub fn get<Q>(&self, prop: &Q) -> JsonLdObjects<'_> ⓘ

Get all the objects associated to the node with the given property.

Source

pub fn get_any<Q>(&self, prop: &Q) -> Option<&JsonLdIndexedObject>

Get one of the objects associated to the node with the given property.

If multiple objects are attached to the node with this property, there are no guaranties on which object will be returned.

Source

pub fn insert(&mut self, prop: JsonLdLenient<Id>, value: JsonLdIndexedObject)

Associates the given object to the node through the given property.

Source

pub fn insert_all<Objects: IntoIterator<Item = JsonLdIndexedObject>>( &mut self, prop: JsonLdLenient<Id>, values: Objects, )

Associates all the given objects to the node through the given property.

If there already exists objects associated to the given reverse property, reverse_value is added to the list. Duplicate objects are not removed.

Source

pub fn reverse_properties_or_insert( &mut self, props: JsonLdReverseProperties, ) -> &mut JsonLdReverseProperties

Source

pub fn reverse_properties_or_default(&mut self) -> &mut JsonLdReverseProperties

Source

pub fn reverse_properties_or_insert_with( &mut self, f: impl FnOnce() -> JsonLdReverseProperties, ) -> &mut JsonLdReverseProperties

Source

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

Equivalence operator.

Equivalence is different from equality for anonymous objects. Anonymous node objects have an implicit unlabeled blank nodes and thus never equivalent.

Trait Implementations§

Source§

impl AnyJsonLdObject for JsonLdNode

Source§

impl Clone for JsonLdNode

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 JsonLdNode

Source§

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

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

impl Default for JsonLdNode

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for JsonLdNode

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 Eq for JsonLdNode

Source§

impl From<JsonLdNode> for JsonLdObject

Source§

fn from(node: JsonLdNode) -> Self

Converts to this type from the input type.
Source§

impl Hash for JsonLdNode

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 JsonLdVisit for JsonLdNode

Source§

fn visit_with(&self, f: &mut impl FnMut(JsonLdObjectRef<'_>))

Source§

fn visit_mut_with(&mut self, f: &mut impl FnMut(JsonLdObjectMut<'_>))

Source§

fn visit(&self, f: impl FnMut(JsonLdObjectRef<'_>))

Source§

fn visit_mut(&mut self, f: impl FnMut(JsonLdObjectMut<'_>))

Source§

fn relabel_with(&mut self, relabeling: &mut JsonLdRelabeling<impl Generator>)

Source§

fn relabel<G: Generator>(&mut self, generator: G) -> JsonLdRelabeling<G>

Source§

fn canonicalize_with(&mut self, buffer: &mut Buffer)

Source§

fn canonicalize(&mut self)

Source§

fn relabel_and_canonicalize_with( &mut self, relabeling: &mut JsonLdRelabeling<impl Generator>, buffer: &mut Buffer, )

Source§

fn relabel_and_canonicalize<G: Generator>( &mut self, generator: G, ) -> JsonLdRelabeling<G>

Source§

impl Ord for JsonLdNode

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 JsonLdNode

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 JsonLdNode

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 Serialize for JsonLdNode

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 SerializeLinkedData for JsonLdNode

Source§

fn serialize_rdf<S>( &self, serializer: S, graph: Option<&Term>, ) -> Result<S::Ok, S::Error>

Source§

fn serialize_rdf_subjects<S>( &self, serializer: S, predicate: &R, object: &R, graph: Option<&R>, ) -> Result<<S as LinkedDataSerializer<R>>::Ok, <S as LinkedDataSerializer<R>>::Error>

Source§

fn serialize_rdf_objects<S>( &self, serializer: S, subject: &R, predicate: &R, graph: Option<&R>, ) -> Result<<S as LinkedDataSerializer<R>>::Ok, <S as LinkedDataSerializer<R>>::Error>

Source§

fn serialize_rdf_graph<S>( &self, serializer: S, graph: Option<&R>, ) -> Result<<S as LinkedDataSerializer<R>>::Ok, <S as LinkedDataSerializer<R>>::Error>

Serialize quads, ignoring top level resources.
Source§

impl SerializeLinkedDataWith<RdfSerializationOptions> for JsonLdNode

Source§

fn serialize_rdf_with<S>( &self, opts: RdfSerializationOptions, serializer: S, graph: Option<&Term>, ) -> Result<S::Ok, S::Error>

Source§

fn serialize_rdf_subjects_with<S>( &self, state: Q, serializer: S, predicate: &R, object: &R, graph: Option<&R>, ) -> Result<<S as LinkedDataSerializer<R>>::Ok, <S as LinkedDataSerializer<R>>::Error>

Source§

fn serialize_rdf_objects_with<S>( &self, state: Q, serializer: S, subject: &R, predicate: &R, graph: Option<&R>, ) -> Result<<S as LinkedDataSerializer<R>>::Ok, <S as LinkedDataSerializer<R>>::Error>

Source§

fn serialize_rdf_graph_with<S>( &self, state: Q, serializer: S, graph: Option<&R>, ) -> Result<<S as LinkedDataSerializer<R>>::Ok, <S as LinkedDataSerializer<R>>::Error>

Serialize quads, ignoring top level resources.
Source§

impl StructuralPartialEq for JsonLdNode

Source§

impl TryFrom<JsonLdObject> for JsonLdNode

Source§

type Error = JsonLdObject

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

fn try_from(obj: JsonLdObject) -> Result<JsonLdNode, JsonLdObject>

Performs the conversion.

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<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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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<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> ErasedDestructor for T
where T: 'static,

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

Source§

fn json_at<F>( self, location: impl Into<Vec<JsonBacktraceFrame<F>>>, ) -> JsonLocated<T, F>

Pairs self with location.
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + 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: Sized + 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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

Source§

type Owned = T

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