Struct Metadata

Source
pub struct Metadata { /* private fields */ }

Implementations§

Source§

impl Metadata

Source

pub fn new_of_type(metadata_type: MetadataType) -> Ref<Self>

Source

pub fn get_type(&self) -> MetadataType

Source

pub fn get_boolean(&self) -> Option<bool>

Source

pub fn get_unsigned_integer(&self) -> Option<u64>

Source

pub fn get_signed_integer(&self) -> Option<i64>

Source

pub fn get_double(&self) -> Option<f64>

Source

pub fn get_string(&self) -> Option<BnString>

Source

pub fn get_boolean_list(&self) -> Option<Vec<bool>>

Source

pub fn get_unsigned_integer_list(&self) -> Option<Vec<u64>>

Source

pub fn get_signed_integer_list(&self) -> Option<Vec<i64>>

Source

pub fn get_double_list(&self) -> Option<Vec<f64>>

Source

pub fn get_string_list(&self) -> Option<Vec<BnString>>

Source

pub fn get_json_string(&self) -> Option<BnString>

Source

pub fn get_raw(&self) -> Option<Vec<u8>>

Source

pub fn get_array(&self) -> Option<Array<Metadata>>

Source

pub fn get_value_store(&self) -> Option<HashMap<String, Ref<Metadata>>>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn index(&self, index: usize) -> Result<Option<Ref<Metadata>>, ()>

Source

pub fn get(&self, key: &str) -> Result<Option<Ref<Metadata>>, ()>

Source

pub fn push(&self, value: &Metadata) -> Result<(), ()>

Source

pub fn insert(&self, key: &str, value: &Metadata) -> Result<(), ()>

Source

pub fn remove_index(&self, index: usize) -> Result<(), ()>

Source

pub fn remove_key(&self, key: &str) -> Result<(), ()>

Trait Implementations§

Source§

impl CoreArrayProvider for Metadata

Source§

impl Debug for Metadata

Source§

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

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

impl Display for Metadata

Source§

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

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

impl IntoJson for &Metadata

Source§

impl PartialEq for Metadata

Source§

fn eq(&self, other: &Self) -> 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 ToOwned for Metadata

Source§

type Owned = Ref<Metadata>

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§

fn clone_into(&self, target: &mut Self::Owned)

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

impl TryFrom<&Metadata> for Array<Metadata>

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for BnString

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for HashMap<String, Ref<Metadata>>

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for String

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for Vec<BnString>

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for Vec<String>

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for Vec<bool>

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for Vec<f64>

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for Vec<i64>

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for Vec<u64>

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for Vec<u8>

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for bool

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for f64

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for i64

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl TryFrom<&Metadata> for u64

Source§

type Error = ()

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

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

Performs the conversion.
Source§

impl Send for Metadata

Source§

impl Sync for Metadata

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