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§const RAW_DOC: &'static CStr = /// Python wrapper for the `ManageData` struct.
const RAW_DOC: &'static CStr = /// Python wrapper for the `ManageData` struct.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§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 for PyManageData
impl PyClassNewTextSignature for PyManageData
const TEXT_SIGNATURE: &'static str = "(set_name, format)"
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
impl ExtractPyClassWithClone 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 UnsafeUnpin 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.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
Source§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
Source§const NAME: &'static str = T::NAME
const NAME: &'static str = T::NAME
Use ::classinfo_object() instead and format the type name at runtime. Note that using built-in cast features is often better than manual PyTypeCheck usage.