Struct awr::message::content::MessageContent
source · pub struct MessageContent { /* private fields */ }
Expand description
Implementations§
source§impl MessageContent
impl MessageContent
sourcepub fn build_friend_message(
py: Python<'_>,
segments: Vec<ElementOrText>
) -> PyResult<&PyAny>
pub fn build_friend_message(
py: Python<'_>,
segments: Vec<ElementOrText>
) -> PyResult<&PyAny>
构造好友消息链。
Python
@staticmethod
async def build_friend_message(*segments: str | Element) -> MessageContent: ...
Trait Implementations§
source§impl Clone for MessageContent
impl Clone for MessageContent
source§fn clone(&self) -> MessageContent
fn clone(&self) -> MessageContent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl From<MessageContent> for MessageChain
impl From<MessageContent> for MessageChain
source§fn from(content: MessageContent) -> Self
fn from(content: MessageContent) -> Self
Converts to this type from the input type.
source§impl IntoPy<Py<PyAny>> for MessageContent
impl IntoPy<Py<PyAny>> for MessageContent
source§impl PyClassImpl for MessageContent
impl PyClassImpl for MessageContent
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)]
§type Layout = PyCell<MessageContent>
type Layout = PyCell<MessageContent>
Layout
§type ThreadChecker = ThreadCheckerStub<MessageContent>
type ThreadChecker = ThreadCheckerStub<MessageContent>
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 dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a MessageContent
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a MessageContent
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut MessageContent
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut MessageContent
source§impl PyMethods<MessageContent> for PyClassImplCollector<MessageContent>
impl PyMethods<MessageContent> for PyClassImplCollector<MessageContent>
fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for MessageContent
impl PyTypeInfo for MessageContent
§type AsRefTarget = PyCell<MessageContent>
type AsRefTarget = PyCell<MessageContent>
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.
§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.
§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.§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.