pub struct Auto { /* private fields */ }Expand description
The task’s span inside a Task::scope, the process’s span outside.
PHP: Utopia\Span\Storage\Auto, which uses the coroutine storage inside
a Swoole coroutine and the memory storage elsewhere.
use utopia_span::{Auto, Span, Storage};
let storage = Auto::new();
let span = Span::new("cli");
storage.set(Some(span.clone()));
assert_eq!(storage.get(), Some(span));use Utopia\Span\Span;
use Utopia\Span\Storage\Auto;
$storage = new Auto();
$span = new Span('cli');
$storage->set($span);
var_dump($storage->get() === $span); // bool(true)Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Auto
impl Forget for Auto
impl Move for Auto
impl RefUnwindSafe for Auto
impl Send for Auto
impl Sync for Auto
impl Unpin for Auto
impl UnsafeUnpin for Auto
impl UnwindSafe for Auto
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