pub struct Notification(/* private fields */);Expand description
拥有型且长度受限的通知;不实现输出消息内容的诊断格式化。
Implementations§
Source§impl Notification
impl Notification
Sourcepub fn new(fields: NotificationFields) -> Self
pub fn new(fields: NotificationFields) -> Self
业务作用:在通知跨越异步队列前建立文本长度和控制字符边界。
参数说明:
fields:是仅在规则命中后构造的通知输入,不得包含凭据或绑定参数。
返回:标识最多 128 字符、方法最多 512 字符、SQL 最多 4096 字符的只读通知。
Sourcepub fn fields(&self) -> &NotificationFields
pub fn fields(&self) -> &NotificationFields
业务作用:允许 transport 读取已经通过边界约束的消息。
参数说明:无。
返回:不可修改的通知内容,调用方不得写入普通日志。
Trait Implementations§
Auto Trait Implementations§
impl Forget for Notification
impl Freeze for Notification
impl Move for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnsafeUnpin for Notification
impl UnwindSafe for Notification
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