Struct icu_provider::prelude::DataResponse[][src]

pub struct DataResponse<'data, M> where
    M: DataMarker<'data>, 
{ pub metadata: DataResponseMetadata, pub payload: Option<DataPayload<'data, M>>, }
Expand description

A response object containing an object as payload and metadata about it.

Fields

metadata: DataResponseMetadata

Metadata about the returned object.

payload: Option<DataPayload<'data, M>>

The object itself; None if it was not loaded.

Implementations

Takes ownership of the underlying payload. Error if not present.

Trait Implementations

Cloning a DataResponse is generally a cheap operation. See notes in the Clone impl for Yoke.

Examples

use icu_provider::prelude::*;
use icu_provider::hello_world::*;

let resp1: DataResponse<HelloWorldV1Marker> = todo!();
let resp2 = resp1.clone();

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Return this boxed trait object as Box<dyn Any>. Read more

Return this trait object reference as &dyn Any. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.