pub struct ForgeSignals { /* private fields */ }Expand description
Product analytics and diagnostics handle.
Obtain via use_signals() inside a ForgeProvider.
Implementations§
Source§impl ForgeSignals
impl ForgeSignals
Sourcepub fn new(client: ForgeClient, config: SignalsConfig) -> Self
pub fn new(client: ForgeClient, config: SignalsConfig) -> Self
Create a new signals instance tied to a ForgeClient.
Sourcepub async fn identify(&self, user_id: &str, traits: Value)
pub async fn identify(&self, user_id: &str, traits: Value)
Identify the current user (links session to user).
Sourcepub async fn capture_error(&self, message: &str, context: Value)
pub async fn capture_error(&self, message: &str, context: Value)
Capture a frontend error with optional context.
Add a breadcrumb for error reproduction context.
Sourcepub fn next_correlation_id(&self) -> String
pub fn next_correlation_id(&self) -> String
Generate a correlation ID for the next RPC call.
pub fn get_session_id(&self) -> Option<String>
pub fn auto_page_views(&self) -> bool
pub fn auto_capture_errors(&self) -> bool
pub fn flush_interval(&self) -> u32
pub fn is_destroyed(&self) -> bool
pub fn is_enabled(&self) -> bool
Trait Implementations§
Source§impl Clone for ForgeSignals
impl Clone for ForgeSignals
Source§fn clone(&self) -> ForgeSignals
fn clone(&self) -> ForgeSignals
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 moreAuto Trait Implementations§
impl Freeze for ForgeSignals
impl !RefUnwindSafe for ForgeSignals
impl !Send for ForgeSignals
impl !Sync for ForgeSignals
impl Unpin for ForgeSignals
impl UnsafeUnpin for ForgeSignals
impl !UnwindSafe for ForgeSignals
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.