Struct datafusion_python::expr::literal::PyLiteral
source · pub struct PyLiteral {
pub value: ScalarValue,
}
Fields§
§value: ScalarValue
Implementations§
source§impl PyLiteral
impl PyLiteral
pub fn value_f32(&self) -> PyResult<Option<f32>>
pub fn value_f64(&self) -> PyResult<Option<f64>>
pub fn value_decimal128(&mut self) -> PyResult<(Option<i128>, u8, i8)>
pub fn value_i8(&self) -> PyResult<Option<i8>>
pub fn value_i16(&self) -> PyResult<Option<i16>>
pub fn value_i32(&self) -> PyResult<Option<i32>>
pub fn value_i64(&self) -> PyResult<Option<i64>>
pub fn value_u8(&self) -> PyResult<Option<u8>>
pub fn value_u16(&self) -> PyResult<Option<u16>>
pub fn value_u32(&self) -> PyResult<Option<u32>>
pub fn value_u64(&self) -> PyResult<Option<u64>>
pub fn value_date32(&self) -> PyResult<Option<i32>>
pub fn value_date64(&self) -> PyResult<Option<i64>>
pub fn value_time64(&self) -> PyResult<Option<i64>>
pub fn value_timestamp(&mut self) -> PyResult<(Option<i64>, Option<String>)>
pub fn value_bool(&self) -> PyResult<Option<bool>>
pub fn value_string(&self) -> PyResult<Option<String>>
pub fn value_interval_day_time(&self) -> PyResult<Option<(i32, i32)>>
Trait Implementations§
source§impl From<PyLiteral> for ScalarValue
impl From<PyLiteral> for ScalarValue
source§fn from(lit: PyLiteral) -> ScalarValue
fn from(lit: PyLiteral) -> ScalarValue
Converts to this type from the input type.
source§impl From<ScalarValue> for PyLiteral
impl From<ScalarValue> for PyLiteral
source§fn from(value: ScalarValue) -> PyLiteral
fn from(value: ScalarValue) -> PyLiteral
Converts to this type from the input type.
source§impl PyClassImpl for PyLiteral
impl PyClassImpl for PyLiteral
source§const IS_BASETYPE: bool = true
const IS_BASETYPE: bool = true
#[pyclass(subclass)]
source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
§type ThreadChecker = ThreadCheckerStub<PyLiteral>
type ThreadChecker = ThreadCheckerStub<PyLiteral>
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 BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl PyMethods<PyLiteral> for PyClassImplCollector<PyLiteral>
impl PyMethods<PyLiteral> for PyClassImplCollector<PyLiteral>
fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for PyLiteral
impl PyTypeInfo for PyLiteral
§type AsRefTarget = PyCell<PyLiteral>
type AsRefTarget = PyCell<PyLiteral>
Utility type to make Py::as_ref work.
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
source§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.
source§fn 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.source§fn 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 PyLiteral
impl Send for PyLiteral
impl Sync for PyLiteral
impl Unpin for PyLiteral
impl UnwindSafe for PyLiteral
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more