pub fn capture() -> Self {
        SpanTrace {
            span: Span::current(),
        }
    }
/// Capture the current span trace.
///
/// # Examples
/// ```rust
/// use tracing_error::SpanTrace;
///
/// pub struct MyError {
///     span_trace: SpanTrace,
///     // ...
/// }
///
/// # fn some_error_condition() -> bool { true }
///
/// #[tracing::instrument]
/// pub fn my_function(arg: &str) -> Result<(), MyError> {
///     if some_error_condition() {
///         return Err(MyError {
///             span_trace: SpanTrace::capture(),
///             // ...
///         });
///     }
///
///     // ...
/// #   Ok(())
/// }
/// ```
Capture the current span trace.
Capture the current span trace .
pub fn capture() -> Self {
        SpanTrace {
            span: Span::current(),
        }
    }
pub fn capture ( ) -> Self { SpanTrace { span : Span :: current ( ) , } }
Capture the current span trace.
Capture the current span trace .
examples
```rust
use tracing_error::SpanTrace.

pub struct MyError {
span_trace: SpanTrace,

}
` ` ` rust use tracing_error :: SpanTrace . pub struct MyError { span_trace : SpanTrace }
fn some_error_condition() -> bool { true }
None
[tracing::instrument]
pub fn my_function(arg: &str) -> Result<(), MyError> {
if some_error_condition() {
return Err(MyError {
span_trace: SpanTrace::capture(),

});
}


pub fn my_function ( arg : &str ) - > Result< () MyError > { if some_error_condition () { return Err ( MyError { span_trace : SpanTrace :: capture () } ) ; }
ok(())
None