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
  • objstr

This view

  • Original page
  • New address

GeezerVison is showing rustpython.github.io — rustpython_vm::obj::objstr::PyString - Rust

[−][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]

fn clone(&self) -> PyString[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for PyString[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Formats the value using the given formatter. Read more

impl Display for PyString[src]

fn fmt(&self, f: &mut Formatter) -> Result[src]

Formats the value using the given formatter. Read more

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

fn from(s: &str) -> PyString[src]

Performs the conversion.

impl From<String> for PyString[src]

fn from(s: String) -> PyString[src]

Performs the conversion.

impl PyClassDef for PyString[src]

const NAME: &'static str[src]

const DOC: Option<&'static str>[src]

impl PyClassImpl for PyString[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]

impl PyValue for PyString[src]

fn class(vm: &VirtualMachine) -> PyClassRef[src]

const HAVE_DICT: bool[src]

fn into_ref(self, vm: &VirtualMachine) -> PyRef<Self>[src]

fn into_ref_with_type(
    self,
    vm: &VirtualMachine,
    cls: PyClassRef
) -> PyResult<PyRef<Self>>
[src]

fn into_ref_with_type_unchecked(
    self,
    cls: PyClassRef,
    dict: Option<PyDictRef>
) -> PyRef<Self>
[src]

impl TryIntoRef<PyString> for String[src]

fn try_into_ref(self, vm: &VirtualMachine) -> PyResult<PyRef<PyString>>[src]

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

fn try_into_ref(self, vm: &VirtualMachine) -> PyResult<PyRef<PyString>>[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]

fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

fn from(t: T) -> T[src]

Performs the conversion.

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

fn into(self) -> U[src]

Performs the conversion.

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

fn into_pyobject(
    Self,
    &VirtualMachine
) -> Result<Rc<PyObject<dyn PyObjectPayload + 'static>>, PyRef<PyBaseException>>
[src]

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

fn as_any(&Self) -> &(dyn Any + 'static)[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.

fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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

default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

fn vzip(self) -> V

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.