Struct border_core::core::record::Record[][src]

pub struct Record(_);
Expand description

Represents a record.

Implementations

impl Record[src]

pub fn empty() -> Self[src]

Construct empty record.

pub fn from_slice<K: Into<String> + Clone>(s: &[(K, RecordValue)]) -> Self[src]

Create Record from slice of (Into<String>, RecordValue).

pub fn keys(&self) -> Keys<'_, String, RecordValue>[src]

Get keys.

pub fn insert(&mut self, k: impl Into<String>, v: RecordValue)[src]

Insert a key-value pair into the record.

pub fn iter(&self) -> Iter<'_, String, RecordValue>[src]

Return an iterator over key-value pairs in the record.

pub fn into_iter_in_record(self) -> IntoIter<String, RecordValue>[src]

Return an iterator over key-value pairs in the record.

pub fn get(&self, k: &str) -> Option<&RecordValue>[src]

Get the value of the given key.

pub fn merge(self, record: Record) -> Self[src]

Merge records.

pub fn get_scalar(&self, k: &str) -> Result<f32, LrrError>[src]

Get scalar value.

pub fn get_array1(&self, k: &str) -> Result<Vec<f32>, LrrError>[src]

Get Array1 value.

pub fn get_array2(&self, k: &str) -> Result<(Vec<f32>, [usize; 2]), LrrError>[src]

Get Array2 value.

pub fn get_array3(&self, k: &str) -> Result<(Vec<f32>, [usize; 3]), LrrError>[src]

Get Array3 value.

Trait Implementations

impl Debug for Record[src]

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl RefUnwindSafe for Record

impl Send for Record

impl Sync for Record

impl Unpin for Record

impl UnwindSafe for Record

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T

pub const ALIGN: usize

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.