pub struct OnionTuple { /* private fields */ }
Expand description
Implementations§
Source§impl OnionTuple
impl OnionTuple
Sourcepub fn new_static(elements: Vec<&OnionStaticObject>) -> OnionStaticObject
pub fn new_static(elements: Vec<&OnionStaticObject>) -> OnionStaticObject
Sourcepub fn new_static_no_ref(elements: &Vec<OnionStaticObject>) -> OnionStaticObject
pub fn new_static_no_ref(elements: &Vec<OnionStaticObject>) -> OnionStaticObject
Sourcepub fn new_from_slice(elements: &[OnionStaticObject]) -> OnionStaticObject
pub fn new_from_slice(elements: &[OnionStaticObject]) -> OnionStaticObject
Sourcepub fn get_elements(&self) -> &[OnionObject]
pub fn get_elements(&self) -> &[OnionObject]
获取元组元素的引用。
Sourcepub fn upgrade(&self, collected: &mut Vec<GCArc<OnionObjectCell>>)
pub fn upgrade(&self, collected: &mut Vec<GCArc<OnionObjectCell>>)
升级元组中所有元素的对象引用。
用于 GC 跟踪,防止元素被提前回收。
Sourcepub fn len(&self) -> Result<OnionStaticObject, RuntimeError>
pub fn len(&self) -> Result<OnionStaticObject, RuntimeError>
Sourcepub fn at(&self, index: i64) -> Result<OnionStaticObject, RuntimeError>
pub fn at(&self, index: i64) -> Result<OnionStaticObject, RuntimeError>
Sourcepub fn with_index<F, R>(&self, index: i64, f: &F) -> Result<R, RuntimeError>
pub fn with_index<F, R>(&self, index: i64, f: &F) -> Result<R, RuntimeError>
Sourcepub fn with_attribute<F, R>(
&self,
key: &OnionObject,
f: &F,
) -> Result<R, RuntimeError>
pub fn with_attribute<F, R>( &self, key: &OnionObject, f: &F, ) -> Result<R, RuntimeError>
Sourcepub fn binary_add(
&self,
other: &OnionObject,
) -> Result<OnionStaticObject, RuntimeError>
pub fn binary_add( &self, other: &OnionObject, ) -> Result<OnionStaticObject, RuntimeError>
Sourcepub fn contains(&self, other: &OnionObject) -> Result<bool, RuntimeError>
pub fn contains(&self, other: &OnionObject) -> Result<bool, RuntimeError>
Source§impl OnionTuple
impl OnionTuple
pub fn equals(&self, other: &OnionObject) -> Result<bool, RuntimeError>
Trait Implementations§
Source§impl Clone for OnionTuple
impl Clone for OnionTuple
Source§fn clone(&self) -> OnionTuple
fn clone(&self) -> OnionTuple
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for OnionTuple
impl Debug for OnionTuple
Source§impl GCTraceable<OnionObjectCell> for OnionTuple
impl GCTraceable<OnionObjectCell> for OnionTuple
Auto Trait Implementations§
impl Freeze for OnionTuple
impl !RefUnwindSafe for OnionTuple
impl Send for OnionTuple
impl Sync for OnionTuple
impl Unpin for OnionTuple
impl !UnwindSafe for OnionTuple
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more