Enum Data

Source
pub enum Data {
Show 17 variants None, Usize(usize), I16(i16), I32(i32), I64(i64), F32(f32), F64(f64), Bool(bool), String(String), Date(DateTime<Utc>), Json(Value), Vec(Vec<Data>), Raw(Vec<u8>), Map(BTreeMap<i64, Data>), Route(Route), Redirect(Redirect), MailProvider(MailProvider),
}
Expand description

Data transferred between controllers, template, markers, database and cache

§Values

  • None - No data transferred.
  • Usize(usize) - No data transferred.
  • I16(i16) - No data transferred.
  • I32(i32) - No data transferred.
  • I64(i64) - i64 data.
  • F32(f32) - f32 data.
  • F64(f64) - f64 data.
  • Bool(bool) - bool data.
  • String(String) - String data.
  • Date(DateTime<Utc>) - Chrono dateTime.
  • Json(Value) - Serde json.
  • Vec(Vec<Data>) - List of Data.
  • Map(BTreeMap<i64, Data>) - Map of Data.
  • Route(Route) - Route data.
  • Redirect(Redirect) - Redirect data.
  • MailProvider(MailProvider) - Mail provider data.

Variants§

§

None

No data transferred.

§

Usize(usize)

usize data.

§

I16(i16)

i16 data.

§

I32(i32)

i32 data.

§

I64(i64)

i64 data.

§

F32(f32)

f32 data.

§

F64(f64)

f64 data.

§

Bool(bool)

bool data.

§

String(String)

String data.

§

Date(DateTime<Utc>)

DateTime.

§

Json(Value)

Json

§

Vec(Vec<Data>)

List of Data.

§

Raw(Vec<u8>)

Raw data,

§

Map(BTreeMap<i64, Data>)

Map of Data.

§

Route(Route)

Route data.

§

Redirect(Redirect)

Redirect data.

§

MailProvider(MailProvider)

Mail provider data

Implementations§

Source§

impl Data

Source

pub fn get<T>(&self, key: impl StrOrI64) -> Option<&T>
where for<'a> &'a T: From<&'a Data>,

Source

pub fn take<T>(&mut self, key: impl StrOrI64) -> Option<T>
where T: From<Data>,

Trait Implementations§

Source§

impl Clone for Data

Source§

fn clone(&self) -> Data

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 Data

Source§

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

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

impl<'de> Deserialize<'de> for Data

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<'a> From<&'a Data> for &'a BTreeMap<i64, Data>

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a DateTime<Utc>

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a String

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a Value

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a Vec<Data>

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a Vec<u8>

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a bool

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a f32

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a f64

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a i16

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a i32

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a i64

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a Data> for &'a usize

Source§

fn from(value: &'a Data) -> Self

Converts to this type from the input type.
Source§

impl From<BTreeMap<i64, Data>> for Data

Source§

fn from(value: BTreeMap<i64, Data>) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for BTreeMap<i64, Data>

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for DateTime<Utc>

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for String

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for Value

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for Vec<Data>

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for Vec<u8>

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for bool

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for f32

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for f64

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for i16

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for i32

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for i64

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<Data> for usize

Source§

fn from(value: Data) -> Self

Converts to this type from the input type.
Source§

impl From<DateTime<Utc>> for Data

Source§

fn from(value: DateTime<Utc>) -> Self

Converts to this type from the input type.
Source§

impl From<String> for Data

Source§

fn from(value: String) -> Self

Converts to this type from the input type.
Source§

impl From<Value> for Data

Source§

fn from(value: Value) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<Data>> for Data

Source§

fn from(value: Vec<Data>) -> Self

Converts to this type from the input type.
Source§

impl From<Vec<u8>> for Data

Source§

fn from(value: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for Data

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl From<f32> for Data

Source§

fn from(value: f32) -> Self

Converts to this type from the input type.
Source§

impl From<f64> for Data

Source§

fn from(value: f64) -> Self

Converts to this type from the input type.
Source§

impl From<i16> for Data

Source§

fn from(value: i16) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Data

Source§

fn from(value: i32) -> Self

Converts to this type from the input type.
Source§

impl From<i64> for Data

Source§

fn from(value: i64) -> Self

Converts to this type from the input type.
Source§

impl From<usize> for Data

Source§

fn from(value: usize) -> Self

Converts to this type from the input type.
Source§

impl Serialize for Data

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

Auto Trait Implementations§

§

impl Freeze for Data

§

impl !RefUnwindSafe for Data

§

impl Send for Data

§

impl Sync for Data

§

impl Unpin for Data

§

impl !UnwindSafe for Data

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

Source§

fn len(&self) -> usize

The number of items that this chain link consists of.
Source§

fn append_to(self, v: &mut Vec<T>)

Append the elements in this link to the chain.
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> Container<T> for T
where T: Clone,

Source§

type Iter = Once<T>

An iterator over the items within this container, by value.
Source§

fn get_iter(&self) -> <T as Container<T>>::Iter

Iterate over the elements of the container (using internal iteration because GATs are unstable).
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> 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, 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> OrderedContainer<T> for T
where T: Clone,