pub struct IdGenerator;Expand description
ID生成器
Implementations§
Source§impl IdGenerator
impl IdGenerator
Sourcepub fn generate_memory_id() -> MemoryId
pub fn generate_memory_id() -> MemoryId
生成记忆ID
Sourcepub fn generate_connection_id() -> ConnectionId
pub fn generate_connection_id() -> ConnectionId
生成连接ID
Sourcepub fn generate_session_id() -> String
pub fn generate_session_id() -> String
生成会话ID
Sourcepub fn generate_query_id() -> String
pub fn generate_query_id() -> String
生成查询ID
Sourcepub fn generate_interaction_id() -> String
pub fn generate_interaction_id() -> String
生成交互ID
Sourcepub fn generate_time_based_id(prefix: &str) -> String
pub fn generate_time_based_id(prefix: &str) -> String
从时间戳生成ID
Sourcepub fn generate_short_id(length: usize) -> String
pub fn generate_short_id(length: usize) -> String
生成短ID(用于显示)
Auto Trait Implementations§
impl Freeze for IdGenerator
impl RefUnwindSafe for IdGenerator
impl Send for IdGenerator
impl Sync for IdGenerator
impl Unpin for IdGenerator
impl UnsafeUnpin for IdGenerator
impl UnwindSafe for IdGenerator
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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