GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • rustpython_vm
  • obj
  • objdict

This view

  • Original page
  • New address

GeezerVison is showing rustpython.github.io — rustpython_vm::obj::objdict::PyDictRef - Rust

[−][src]Type Definition rustpython_vm::obj::objdict::PyDictRef

type PyDictRef = PyRef<PyDict>;

Methods

impl PyDictRef[src]

pub fn copy(self) -> PyDict[src]

pub fn to_attributes(self) -> PyAttributes[src]

Take a python dictionary and convert it to attributes.

pub fn from_attributes(
    attrs: PyAttributes,
    vm: &VirtualMachine
) -> PyResult<Self>
[src]

pub fn contains_key<T: IntoPyObject>(&self, key: T, vm: &VirtualMachine) -> bool[src]

pub fn size(&self) -> DictSize[src]

pub fn get_item_option<T: IntoPyObject + DictKey + Copy>(
    &self,
    key: T,
    vm: &VirtualMachine
) -> PyResult<Option<PyObjectRef>>
[src]

This function can be used to get an item without raising the KeyError, so we can simply check upon the result being Some python value, or None. Note that we can pass any type which implements the DictKey trait. Notable examples are String and PyObjectRef.

Trait Implementations

impl IntoIterator for PyDictRef[src]

type Item = (PyObjectRef, PyObjectRef)

The type of the elements being iterated over.

type IntoIter = DictIter

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter[src]

Creates an iterator from a value. Read more

impl<'_> IntoIterator for &'_ PyDictRef[src]

type Item = (PyObjectRef, PyObjectRef)

The type of the elements being iterated over.

type IntoIter = DictIter

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter[src]

Creates an iterator from a value. Read more

impl ItemProtocol for PyDictRef[src]

fn get_item<T: IntoPyObject + DictKey + Copy>(
    &self,
    key: T,
    vm: &VirtualMachine
) -> PyResult
[src]

fn set_item<T: IntoPyObject + DictKey + Copy>(
    &self,
    key: T,
    value: PyObjectRef,
    vm: &VirtualMachine
) -> PyResult
[src]

fn del_item<T: IntoPyObject + DictKey + Copy>(
    &self,
    key: T,
    vm: &VirtualMachine
) -> PyResult
[src]

impl PyClassImpl for PyDictRef[src]

const TP_FLAGS: PyTpFlags[src]

fn impl_extend_class(ctx: &PyContext, class: &PyClassRef)[src]

fn extend_class(ctx: &PyContext, class: &PyClassRef)[src]

fn make_class(ctx: &PyContext) -> PyClassRef[src]

fn make_class_with_base(ctx: &PyContext, base: PyClassRef) -> PyClassRef[src]

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.