copperlace._native
index
/home/runner/work/Copperlace/Copperlace/python/copperlace/_native.py

 
Modules
       
ctypes
os
platform

 
Classes
       
builtins.RuntimeError(builtins.Exception)
NativeError
builtins.object
NativeLibrary
NativeProcessorRegistry

 
class NativeError(builtins.RuntimeError)
    NativeError(status: 'int', message: 'str') -> 'None'
 

 
 
Method resolution order:
NativeError
builtins.RuntimeError
builtins.Exception
builtins.BaseException
builtins.object

Methods defined here:
__init__(self, status: 'int', message: 'str') -> 'None'
Initialize self.  See help(type(self)) for accurate signature.

Data descriptors defined here:
__weakref__
list of weak references to the object

Static methods inherited from builtins.RuntimeError:
__new__(*args, **kwargs) class method of builtins.RuntimeError
Create and return a new object.  See help(type) for accurate signature.

Methods inherited from builtins.BaseException:
__getattribute__(self, name, /)
Return getattr(self, name).
__reduce__(...)
Helper for pickle.
__repr__(self, /)
Return repr(self).
__setstate__(...)
__str__(self, /)
Return str(self).
add_note(...)
Exception.add_note(note) --
add a note to the exception
with_traceback(...)
Exception.with_traceback(tb) --
set self.__traceback__ to tb and return self.

Data descriptors inherited from builtins.BaseException:
__cause__
exception cause
__context__
exception context
__dict__
__suppress_context__
__traceback__
args

 
class NativeLibrary(builtins.object)
    NativeLibrary() -> 'None'
 

 
  Methods defined here:
__init__(self) -> 'None'
Initialize self.  See help(type(self)) for accurate signature.
processor_result_set_error(self, result: 'ctypes.c_void_p', message: 'str') -> 'int'
processor_result_set_output(self, result: 'ctypes.c_void_p', value: 'str') -> 'int'
ruleset_free(self, handle: 'ctypes.c_void_p') -> 'None'
ruleset_from_file(self, path: 'str | os.PathLike[str]', processors: 'Mapping[str, Callable[[str], str]] | None' = None) -> 'tuple[ctypes.c_void_p, object | None]'
ruleset_from_string(self, config: 'str', processors: 'Mapping[str, Callable[[str], str]] | None' = None) -> 'tuple[ctypes.c_void_p, object | None]'
ruleset_render(self, handle: 'ctypes.c_void_p', rule: 'str') -> 'str'
ruleset_render_inferred(self, handle: 'ctypes.c_void_p', rule: 'str') -> 'str'
ruleset_render_inferred_with_context(self, handle: 'ctypes.c_void_p', rule: 'str', context: 'Mapping[str, str]') -> 'str'
ruleset_render_structured_json(self, handle: 'ctypes.c_void_p', rule: 'str', format_json: 'bool' = True) -> 'str'
ruleset_render_structured_json_with_context(self, handle: 'ctypes.c_void_p', rule: 'str', context: 'Mapping[str, str]', format_json: 'bool' = True) -> 'str'
ruleset_render_with_context(self, handle: 'ctypes.c_void_p', rule: 'str', context: 'Mapping[str, str]') -> 'str'
string_free(self, value: 'ctypes.c_void_p') -> 'None'

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

 
class NativeProcessorRegistry(builtins.object)
    NativeProcessorRegistry(library: 'NativeLibrary', processors: 'Mapping[str, Callable[[str], str]]') -> 'None'
 

 
  Methods defined here:
__init__(self, library: 'NativeLibrary', processors: 'Mapping[str, Callable[[str], str]]') -> 'None'
Initialize self.  See help(type(self)) for accurate signature.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

 
Functions
       
find_library() -> 'Path'
native() -> 'NativeLibrary'
native_library_name() -> 'str'

 
Data
        COPPERLACE_INVALID_ARGUMENT = 1
COPPERLACE_OK = 0
COPPERLACE_PARSE_ERROR = 2
COPPERLACE_RENDER_ERROR = 3
__annotations__ = {'_NATIVE': 'NativeLibrary | None'}