pub struct ComSocketServer {
pub address: String,
pub actions: WidgetAction,
/* private fields */
}Fields§
§address: String§actions: WidgetActionImplementations§
Source§impl ComSocketServer
impl ComSocketServer
pub fn new(address: &str) -> ComSocketServer
pub fn _get_action(&mut self, key: &str) -> Result<Option<&Py<PyAny>>>
pub fn open(&mut self) -> Result<(), ServerStateError>
pub fn serve(&mut self) -> Result<()>
pub fn callback( &mut self, id: u8, status: ServerStatus, data: Py<PyAny>, ) -> Result<()>
pub fn close(&mut self) -> Result<()>
Trait Implementations§
Source§impl HasPyGilRef for ComSocketServer
impl HasPyGilRef for ComSocketServer
Source§type AsRefTarget = PyCell<ComSocketServer>
type AsRefTarget = PyCell<ComSocketServer>
Utility type to make Py::as_ref work.
Source§impl PyClass for ComSocketServer
impl PyClass for ComSocketServer
Source§impl PyClassImpl for ComSocketServer
impl PyClassImpl for ComSocketServer
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[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)]
Source§type ThreadChecker = SendablePyClass<ComSocketServer>
type ThreadChecker = SendablePyClass<ComSocketServer>
This handles following two situations: Read more
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Immutable or mutable
Source§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 PyClassNewTextSignature<ComSocketServer> for PyClassImplCollector<ComSocketServer>
impl PyClassNewTextSignature<ComSocketServer> for PyClassImplCollector<ComSocketServer>
fn new_text_signature(self) -> Option<&'static str>
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a ComSocketServer
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a ComSocketServer
Source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut ComSocketServer
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut ComSocketServer
Source§impl PyMethods<ComSocketServer> for PyClassImplCollector<ComSocketServer>
impl PyMethods<ComSocketServer> for PyClassImplCollector<ComSocketServer>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for ComSocketServer
impl PyTypeInfo for ComSocketServer
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
👎Deprecated since 0.21.0:
PyTypeInfo::type_object will be replaced by PyTypeInfo::type_object_bound in a future PyO3 versionReturns the safe abstraction over the type object.
Source§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
Source§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
👎Deprecated since 0.21.0:
PyTypeInfo::is_type_of will be replaced by PyTypeInfo::is_type_of_bound in a future PyO3 versionChecks if
object is an instance of this type or a subclass of this type.Source§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, 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
👎Deprecated since 0.21.0:
PyTypeInfo::is_exact_type_of will be replaced by PyTypeInfo::is_exact_type_of_bound in a future PyO3 versionChecks if
object is an instance of this type.Source§impl ServerCom for ComSocketServer
impl ServerCom for ComSocketServer
fn open(&mut self) -> Result<(), ServerStateError>
fn register_action( &mut self, id: u8, widget: &str, action: Action, ) -> Result<()>
fn callback_result(&mut self, data: ResultFrame) -> Result<()>
fn listen(&mut self) -> Result<Option<Frame>>
fn serve(&mut self) -> Result<()>
fn close(&mut self) -> Result<()>
impl DerefToPyAny for ComSocketServer
Auto Trait Implementations§
impl Freeze for ComSocketServer
impl !RefUnwindSafe for ComSocketServer
impl Send for ComSocketServer
impl Sync for ComSocketServer
impl Unpin for ComSocketServer
impl UnwindSafe for ComSocketServer
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