pub struct ContextData {
pub user_id: Option<String>,
pub tenant_id: Option<String>,
pub request_id: Option<String>,
pub extras: HashMap<String, String>,
}
Expand description
上下文数据
Fields§
§user_id: Option<String>
用户ID
tenant_id: Option<String>
租户ID
request_id: Option<String>
请求ID
extras: HashMap<String, String>
其他数据
Trait Implementations§
Source§impl Clone for ContextData
impl Clone for ContextData
Source§fn clone(&self) -> ContextData
fn clone(&self) -> ContextData
Returns a duplicate 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 Debug for ContextData
impl Debug for ContextData
Source§impl Default for ContextData
impl Default for ContextData
Source§fn default() -> ContextData
fn default() -> ContextData
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContextData
impl<'de> Deserialize<'de> for ContextData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContextData
impl RefUnwindSafe for ContextData
impl Send for ContextData
impl Sync for ContextData
impl Unpin for ContextData
impl UnwindSafe for ContextData
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