pub struct ConsoleMessage { /* private fields */ }Expand description
ConsoleMessage 本地状态。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Implementations§
Source§impl ConsoleMessage
impl ConsoleMessage
Sourcepub fn new(
console_type: impl Into<String>,
text: impl Into<String>,
) -> ConsoleMessage
pub fn new( console_type: impl Into<String>, text: impl Into<String>, ) -> ConsoleMessage
构造 ConsoleMessage。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Sourcepub fn console_type(&self) -> String
pub fn console_type(&self) -> String
Console type(log/info/warning/error/…)。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Sourcepub fn type_str(&self) -> &str
pub fn type_str(&self) -> &str
Console type 字符串引用(无 clone)。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Sourcepub fn set_text(&self, t: impl Into<String>)
pub fn set_text(&self, t: impl Into<String>)
设置 text。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Sourcepub fn args(&self) -> Vec<Rc<JSHandle>>
pub fn args(&self) -> Vec<Rc<JSHandle>>
Args(JSHandle 列表克隆)。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Sourcepub fn location(&self) -> Option<ConsoleLocation>
pub fn location(&self) -> Option<ConsoleLocation>
调用位置。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Sourcepub fn set_location(&self, loc: ConsoleLocation)
pub fn set_location(&self, loc: ConsoleLocation)
设置 location。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Sourcepub fn execution_context_id(&self) -> Option<String>
pub fn execution_context_id(&self) -> Option<String>
ExecutionContext id。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Sourcepub fn set_execution_context_id(&self, id: impl Into<String>)
pub fn set_execution_context_id(&self, id: impl Into<String>)
设置 ExecutionContext id。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Sourcepub fn serialized_args(&self) -> Vec<Value>
pub fn serialized_args(&self) -> Vec<Value>
序列化 args(JSON 形式)。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Sourcepub fn add_serialized_arg(&self, v: Value)
pub fn add_serialized_arg(&self, v: Value)
添加序列化 arg。
@trace REQ-BAO-API-006 [class:ConsoleMessage]
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ConsoleMessage
impl !RefUnwindSafe for ConsoleMessage
impl !Send for ConsoleMessage
impl !Sync for ConsoleMessage
impl !UnwindSafe for ConsoleMessage
impl Unpin for ConsoleMessage
impl UnsafeUnpin for ConsoleMessage
Blanket Implementations§
Source§impl<T> AsCtxPtr for Twhere
T: ?Sized,
impl<T> AsCtxPtr for Twhere
T: ?Sized,
Source§fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
self’s address as *mut Self for deferred-task / scopeguard /
ref_guard ctx slots. The closures/trampolines deref it as shared
(&*p) — every method they reach is &self post-R-2, so no write
provenance is required; the *mut spelling is purely to match the
existing DerefOnDrop / HasAutoFlush / RefCount ABI.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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
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 more