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) -> Result<bool, ()>

source

pub fn get_unsigned_integer(&self) -> Result<u64, ()>

source

pub fn get_signed_integer(&self) -> Result<i64, ()>

source

pub fn get_double(&self) -> Result<f64, ()>

source

pub fn get_string(&self) -> Result<BnString, ()>

source

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

source

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

source

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

source

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

source

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

source

pub fn get_json_string(&self) -> Result<BnString, ()>

source

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

source

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

source

pub fn get_value_store(&self) -> Result<HashMap<BnString, 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<S: BnStrCompatible>( &self, key: S ) -> Result<Option<Ref<Metadata>>, ()>

source

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

source

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

source

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

source

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

Trait Implementations§

source§

impl CoreArrayProvider for Metadata

§

type Raw = *mut BNMetadata

§

type Context = ()

§

type Wrapped<'a> = Guard<'a, Metadata>

source§

impl IntoJson for &Metadata

source§

impl PartialEq for Metadata

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl ToOwned for Metadata

§

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>

§

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

§

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<BnString, Ref<Metadata>>

§

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

§

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

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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>

§

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

§

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

§

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

§

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

§

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, U> TryFrom<U> for T
where U: Into<T>,

§

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

§

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.