Struct OnionTuple

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

Implementations§

Source§

impl OnionTuple

Source

pub fn new(elements: Vec<OnionObject>) -> Self

Source

pub fn new_static(elements: Vec<&OnionStaticObject>) -> OnionStaticObject

Source

pub fn new_static_no_ref(elements: &Vec<OnionStaticObject>) -> OnionStaticObject

Source

pub fn get_elements(&self) -> &Box<[OnionObject]>

Source

pub fn upgrade(&self, collected: &mut Vec<GCArc<OnionObjectCell>>)

Source

pub fn len(&self) -> Result<OnionStaticObject, RuntimeError>

Source

pub fn at(&self, index: i64) -> Result<OnionStaticObject, RuntimeError>

Source

pub fn with_index<F, R>(&self, index: i64, f: &F) -> Result<R, RuntimeError>
where F: Fn(&OnionObject) -> Result<R, RuntimeError>,

Source

pub fn with_attribute<F, R>( &self, key: &OnionObject, f: &F, ) -> Result<R, RuntimeError>
where F: Fn(&OnionObject) -> Result<R, RuntimeError>,

Source

pub fn binary_add( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>

Source

pub fn contains(&self, other: &OnionObject) -> Result<bool, RuntimeError>

Source§

impl OnionTuple

Source

pub fn equals(&self, other: &OnionObject) -> Result<bool, RuntimeError>

Trait Implementations§

Source§

impl Debug for OnionTuple

Source§

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

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

impl GCTraceable<OnionObjectCell> for OnionTuple

Source§

fn collect(&self, queue: &mut VecDeque<GCArcWeak<OnionObjectCell>>)

collects all reachable objects and adds them to the provided queue.

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

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.