Struct puff_rs::web::client::PyHttpResponse
source · pub struct PyHttpResponse { /* private fields */ }
Implementations
sourceimpl PyHttpResponse
impl PyHttpResponse
pub fn status(&self) -> u16
pub fn headers(&mut self, py: Python<'_>) -> PyResult<PyObject>
pub fn header(
&mut self,
py: Python<'_>,
hn: &PyString
) -> PyResult<Option<PyObject>>
pub fn json(&mut self, return_func: PyObject) -> PyResult<()>
pub fn body(&mut self, return_func: PyObject) -> PyResult<()>
pub fn body_text(&mut self, return_func: PyObject) -> PyResult<()>
Trait Implementations
sourceimpl IntoPy<Py<PyAny>> for PyHttpResponse
impl IntoPy<Py<PyAny>> for PyHttpResponse
sourceimpl PyClass for PyHttpResponse
impl PyClass for PyHttpResponse
sourceimpl PyClassImpl for PyHttpResponse
impl PyClassImpl for PyHttpResponse
sourceconst IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
sourceconst IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
sourceconst IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
sourceconst IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
type Layout = PyCell<PyHttpResponse>
type Layout = PyCell<PyHttpResponse>
Layout
type ThreadChecker = ThreadCheckerStub<PyHttpResponse>
type ThreadChecker = ThreadCheckerStub<PyHttpResponse>
This handles following two situations: Read more
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
type Dict = PyClassDummySlot
type Dict = PyClassDummySlot
Specify this class has
#[pyclass(dict)]
or not.type WeakRef = PyClassDummySlot
type WeakRef = PyClassDummySlot
Specify this class has
#[pyclass(weakref)]
or not.type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
. Read morefn items_iter() -> PyClassItemsIter
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
sourceimpl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyHttpResponse
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyHttpResponse
sourceimpl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut PyHttpResponse
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut PyHttpResponse
sourceimpl PyMethods<PyHttpResponse> for PyClassImplCollector<PyHttpResponse>
impl PyMethods<PyHttpResponse> for PyClassImplCollector<PyHttpResponse>
fn py_methods(self) -> &'static PyClassItems
sourceimpl PyTypeInfo for PyHttpResponse
impl PyTypeInfo for PyHttpResponse
type AsRefTarget = PyCell<PyHttpResponse>
type AsRefTarget = PyCell<PyHttpResponse>
Utility type to make Py::as_ref work.
sourcefn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
sourcefn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.
sourcefn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type or a subclass of this type.sourcefn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type.Auto Trait Implementations
impl !RefUnwindSafe for PyHttpResponse
impl Send for PyHttpResponse
impl Sync for PyHttpResponse
impl Unpin for PyHttpResponse
impl !UnwindSafe for PyHttpResponse
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more