◐ Shell
clean mode source ↗

rustpython_vm::obj::objbytes::PyBytes - Rust

"bytes(iterable_of_ints) -> bytes\n
bytes(string, encoding[, errors]) -> bytes\n
bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\n
bytes(int) -> bytes object of size given by the parameter initialized with null bytes\n
bytes() -> empty bytes object\n\nConstruct an immutable array of bytes from:\n

  • an iterable yielding integers in range(256)\n
  • a text string encoded using the specified encoding\n
  • any object implementing the buffer API.\n
  • an integer";

impl PyBytes[src]

pub fn new(elements: Vec<u8>) -> Self[src]

pub fn get_value(&self) -> &[u8][src]

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]

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]

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

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

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

fn vzip(self) -> V