[][src]Struct rustpython_vm::obj::objstr::PyString

pub struct PyString { /* fields omitted */ }

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'."

Methods

impl PyString[src]

pub fn as_str(&self) -> &str[src]

Trait Implementations

impl Clone for PyString[src]

impl Debug for PyString[src]

impl Display for PyString[src]

impl<'_> From<&'_ str> for PyString[src]

impl From<String> for PyString[src]

impl PyClassDef for PyString[src]

impl PyClassImpl for PyString[src]

impl PyValue for PyString[src]

impl TryIntoRef<PyString> for String[src]

impl<'_> TryIntoRef<PyString> for &'_ str[src]

Auto Trait Implementations

impl !RefUnwindSafe for PyString

impl Send for PyString

impl !Sync for PyString

impl Unpin for PyString

impl UnwindSafe for PyString

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoPyObject for T where
    T: PyValue
[src]

impl<T> PyObjectPayload for T where
    T: 'static + PyValue
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,