pub struct Pickle { /* private fields */ }Expand description
A pickle’s values, as read or as built to be written.
Implementations§
Source§impl Pickle
impl Pickle
Sourcepub fn get(&self, id: ValueId) -> &PickleValue
pub fn get(&self, id: ValueId) -> &PickleValue
A value, by where it sits.
Sourcepub fn push(&mut self, value: PickleValue) -> ValueId
pub fn push(&mut self, value: PickleValue) -> ValueId
Adds a value, answering where it sits.
Sourcepub fn global(&mut self, module: &str, name: &str) -> ValueId
pub fn global(&mut self, module: &str, name: &str) -> ValueId
Adds a class or function by name.
Sourcepub fn dict_items(&self, id: ValueId) -> &[(ValueId, ValueId)]
pub fn dict_items(&self, id: ValueId) -> &[(ValueId, ValueId)]
The items of a dict, or of an object’s state where that is a dict, or what was set in an object.
Sourcepub fn dict_get(&self, id: ValueId, key: &str) -> Option<ValueId>
pub fn dict_get(&self, id: ValueId, key: &str) -> Option<ValueId>
The value under a str key of a dict, or of an object’s state.
Sourcepub fn members(&self, id: ValueId) -> &[ValueId]
pub fn members(&self, id: ValueId) -> &[ValueId]
The members of a list, tuple or set, or what was appended to an object.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Pickle
impl Freeze for Pickle
impl Move for Pickle
impl RefUnwindSafe for Pickle
impl Send for Pickle
impl Sync for Pickle
impl Unpin for Pickle
impl UnsafeUnpin for Pickle
impl UnwindSafe for Pickle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more