pub struct PyManageData { /* private fields */ }
Expand description
Python wrapper for the ManageData
struct.
Implementations§
Source§impl PyManageData
impl PyManageData
Sourcepub fn new(set_name: &str, format: PyPdfSetFormat) -> Self
pub fn new(set_name: &str, format: PyPdfSetFormat) -> Self
Create a new ManageData instance.
Sourcepub fn download_pdf(&self) -> PyResult<()>
pub fn download_pdf(&self) -> PyResult<()>
Download the PDF set and extract it into the designated path.
Attempts to download the PDF set and extract it to the appropriate directory.
§Returns
Returns Ok(())
if the download and extraction succeed, or a PyRuntimeError
if the operation fails.
§Errors
Returns a PyRuntimeError
if the download or extraction fails due to network
issues, missing files, or I/O errors.
Sourcepub fn is_pdf_installed(&self) -> bool
pub fn is_pdf_installed(&self) -> bool
Check that the PDF set is installed in the correct path.
Returns true
if the PDF set is installed, false
otherwise.
Sourcepub fn ensure_pdf_installed(&self) -> PyResult<()>
pub fn ensure_pdf_installed(&self) -> PyResult<()>
Ensure that the PDF set is installed, otherwise download it.
Ensures the PDF set is present; if not, attempts to download and install it.
§Returns
Returns Ok(())
if the set is installed or successfully downloaded, or a
PyRuntimeError
if the operation fails.
§Errors
Returns a PyRuntimeError
if the download or installation fails due to network
issues, missing files, or I/O errors.
Trait Implementations§
Source§impl<'py> IntoPyObject<'py> for PyManageData
impl<'py> IntoPyObject<'py> for PyManageData
Source§type Target = PyManageData
type Target = PyManageData
Source§type Output = Bound<'py, <PyManageData as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <PyManageData as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for PyManageData
impl PyClass for PyManageData
Source§impl PyClassImpl for PyManageData
impl PyClassImpl for PyManageData
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§type ThreadChecker = SendablePyClass<PyManageData>
type ThreadChecker = SendablePyClass<PyManageData>
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
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 PyClassNewTextSignature<PyManageData> for PyClassImplCollector<PyManageData>
impl PyClassNewTextSignature<PyManageData> for PyClassImplCollector<PyManageData>
fn new_text_signature(self) -> Option<&'static str>
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a PyManageData
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a PyManageData
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut PyManageData
impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut PyManageData
Source§impl PyMethods<PyManageData> for PyClassImplCollector<PyManageData>
impl PyMethods<PyManageData> for PyClassImplCollector<PyManageData>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for PyManageData
impl PyTypeInfo for PyManageData
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
impl DerefToPyAny for PyManageData
Auto Trait Implementations§
impl Freeze for PyManageData
impl RefUnwindSafe for PyManageData
impl Send for PyManageData
impl Sync for PyManageData
impl Unpin for PyManageData
impl UnwindSafe for PyManageData
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self
into an owned Python object, dropping type information.