Skip to main content

PyStrRef

Type Alias PyStrRef 

Source
pub type PyStrRef = PyRef<PyStr>;

Aliased Type§

pub struct PyStrRef { /* private fields */ }

Methods from Deref<Target = Py<T>>§

Source

pub fn downgrade( &self, callback: Option<PyObjectRef>, vm: &VirtualMachine, ) -> PyResult<PyWeakRef<T>>

Source

pub fn payload(&self) -> &T

Source

pub fn to_base(&self) -> &Py<T::Base>

Converts &Py<T> to &Py<T::Base>.

Source

pub fn upcast_ref<U: PyPayload + StaticType>(&self) -> &Py<U>
where T: StaticType,

Converts &Py<T> to &Py<U> where U is an ancestor type.

Trait Implementations§

Source§

impl AsRef<Wtf8> for PyStrRef

Source§

fn as_ref(&self) -> &Wtf8

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<str> for PyStrRef

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl StrBuffer for PyStrRef