pub struct TryCatch<'s, P> { /* private fields */ }
Expand description
An external exception handler.
Implementations§
source§impl<'s, P> TryCatch<'s, P>
impl<'s, P> TryCatch<'s, P>
sourcepub fn has_caught(&self) -> bool
pub fn has_caught(&self) -> bool
Returns true if an exception has been caught by this try/catch block.
sourcepub fn can_continue(&self) -> bool
pub fn can_continue(&self) -> bool
For certain types of exceptions, it makes no sense to continue execution.
If CanContinue returns false, the correct action is to perform any C++ cleanup needed and then return. If CanContinue returns false and HasTerminated returns true, it is possible to call CancelTerminateExecution in order to continue calling into the engine.
sourcepub fn has_terminated(&self) -> bool
pub fn has_terminated(&self) -> bool
Returns true if an exception has been caught due to script execution being terminated.
There is no JavaScript representation of an execution termination exception. Such exceptions are thrown when the TerminateExecution methods are called to terminate a long-running script.
If such an exception has been thrown, HasTerminated will return true, indicating that it is possible to call CancelTerminateExecution in order to continue calling into the engine.
sourcepub fn is_verbose(&self) -> bool
pub fn is_verbose(&self) -> bool
Returns true if verbosity is enabled.
sourcepub fn set_verbose(&mut self, value: bool)
pub fn set_verbose(&mut self, value: bool)
Set verbosity of the external exception handler.
By default, exceptions that are caught by an external exception handler are not reported. Call SetVerbose with true on an external exception handler to have exceptions caught by the handler reported as if they were not caught.
sourcepub fn set_capture_message(&mut self, value: bool)
pub fn set_capture_message(&mut self, value: bool)
Set whether or not this TryCatch should capture a Message object which holds source information about where the exception occurred. True by default.
sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Clears any exceptions that may have been caught by this try/catch block. After this method has been called, HasCaught() will return false. Cancels the scheduled exception if it is caught and ReThrow() is not called before.
It is not necessary to clear a try/catch block before using it again; if another exception is thrown the previously caught exception will just be overwritten. However, it is often a good idea since it makes it easier to determine which operation threw a given exception.
source§impl<'s, 'p, P> TryCatch<'s, P>
impl<'s, 'p, P> TryCatch<'s, P>
sourcepub fn exception(&mut self) -> Option<Local<'p, Value>>
pub fn exception(&mut self) -> Option<Local<'p, Value>>
Returns the exception caught by this try/catch block. If no exception has been caught an empty handle is returned.
Note: v8.h states that “the returned handle is valid until this TryCatch block has been destroyed”. This is incorrect; the return value lives no longer and no shorter than the active HandleScope at the time this method is called. An issue has been opened about this in the V8 bug tracker: https://bugs.chromium.org/p/v8/issues/detail?id=10537.
sourcepub fn message(&mut self) -> Option<Local<'p, Message>>
pub fn message(&mut self) -> Option<Local<'p, Message>>
Returns the message associated with this exception. If there is no message associated an empty handle is returned.
Note: the remark about the lifetime for the exception()
return value
applies here too.
sourcepub fn rethrow(&mut self) -> Option<Local<'_, Value>>
pub fn rethrow(&mut self) -> Option<Local<'_, Value>>
Throws the exception caught by this TryCatch in a way that avoids it being caught again by this same TryCatch. As with ThrowException it is illegal to execute any JavaScript operations after calling ReThrow; the caller must return immediately to where the exception is caught.
This function returns the undefined
value when successful, or None
if
no exception was caught and therefore there was nothing to rethrow.
Methods from Deref<Target = HandleScope<'p>>§
sourcepub fn get_current_context(&self) -> Local<'s, Context>
pub fn get_current_context(&self) -> Local<'s, Context>
Returns the context of the currently running JavaScript, or the context on the top of the stack if no JavaScript is running.
sourcepub fn get_entered_or_microtask_context(&self) -> Local<'s, Context>
pub fn get_entered_or_microtask_context(&self) -> Local<'s, Context>
Returns either the last context entered through V8’s C++ API, or the context of the currently running microtask while processing microtasks. If a context is entered while executing a microtask, that context is returned.
sourcepub fn throw_exception(
&mut self,
exception: Local<'_, Value>,
) -> Local<'s, Value>
pub fn throw_exception( &mut self, exception: Local<'_, Value>, ) -> Local<'s, Value>
Schedules an exception to be thrown when returning to JavaScript. When an exception has been scheduled it is illegal to invoke any JavaScript operation; the caller must return immediately and only after the exception has been handled does it become legal to invoke JavaScript operations.
This function always returns the undefined
value.
sourcepub fn get_isolate_data_from_snapshot_once<T>(
&mut self,
index: usize,
) -> Result<Local<'s, T>, DataError>
pub fn get_isolate_data_from_snapshot_once<T>( &mut self, index: usize, ) -> Result<Local<'s, T>, DataError>
Return data that was previously attached to the isolate snapshot via
SnapshotCreator, and removes the reference to it. If called again with
same index
argument, this function returns DataError::NoData
.
The value that was stored in the snapshot must either match or be
convertible to type parameter T
, otherwise DataError::BadType
is
returned.
sourcepub fn get_context_data_from_snapshot_once<T>(
&mut self,
index: usize,
) -> Result<Local<'s, T>, DataError>
pub fn get_context_data_from_snapshot_once<T>( &mut self, index: usize, ) -> Result<Local<'s, T>, DataError>
Return data that was previously attached to the context snapshot via
SnapshotCreator, and removes the reference to it. If called again with
same index
argument, this function returns DataError::NoData
.
The value that was stored in the snapshot must either match or be
convertible to type parameter T
, otherwise DataError::BadType
is
returned.
pub fn set_promise_hooks( &mut self, init_hook: Option<Local<'_, Function>>, before_hook: Option<Local<'_, Function>>, after_hook: Option<Local<'_, Function>>, resolve_hook: Option<Local<'_, Function>>, )
pub fn set_continuation_preserved_embedder_data( &mut self, data: Local<'_, Value>, )
pub fn get_continuation_preserved_embedder_data(&mut self) -> Local<'s, Value>
Trait Implementations§
source§impl<'s, 'p, 'e> AsMut<EscapableHandleScope<'p, 'e>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsMut<EscapableHandleScope<'p, 'e>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§fn as_mut(&mut self) -> &mut EscapableHandleScope<'p, 'e>
fn as_mut(&mut self) -> &mut EscapableHandleScope<'p, 'e>
source§impl<'s, 'p, 'e, C> AsMut<EscapableHandleScope<'p, 'e, ()>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
impl<'s, 'p, 'e, C> AsMut<EscapableHandleScope<'p, 'e, ()>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
source§fn as_mut(&mut self) -> &mut EscapableHandleScope<'p, 'e, ()>
fn as_mut(&mut self) -> &mut EscapableHandleScope<'p, 'e, ()>
source§impl<'s, 'p, 'e> AsMut<HandleScope<'p>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsMut<HandleScope<'p>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§fn as_mut(&mut self) -> &mut HandleScope<'p>
fn as_mut(&mut self) -> &mut HandleScope<'p>
source§impl<'s, 'p> AsMut<HandleScope<'p>> for TryCatch<'s, HandleScope<'p>>
impl<'s, 'p> AsMut<HandleScope<'p>> for TryCatch<'s, HandleScope<'p>>
source§fn as_mut(&mut self) -> &mut HandleScope<'p>
fn as_mut(&mut self) -> &mut HandleScope<'p>
source§impl<'s, 'p, 'e, C> AsMut<HandleScope<'p, ()>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
impl<'s, 'p, 'e, C> AsMut<HandleScope<'p, ()>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
source§fn as_mut(&mut self) -> &mut HandleScope<'p, ()>
fn as_mut(&mut self) -> &mut HandleScope<'p, ()>
source§impl<'s, 'p, C> AsMut<HandleScope<'p, ()>> for TryCatch<'s, HandleScope<'p, C>>
impl<'s, 'p, C> AsMut<HandleScope<'p, ()>> for TryCatch<'s, HandleScope<'p, C>>
source§fn as_mut(&mut self) -> &mut HandleScope<'p, ()>
fn as_mut(&mut self) -> &mut HandleScope<'p, ()>
source§impl<'s, 'p, P> AsMut<TryCatch<'p, P>> for AllowJavascriptExecutionScope<'s, TryCatch<'p, P>>
impl<'s, 'p, P> AsMut<TryCatch<'p, P>> for AllowJavascriptExecutionScope<'s, TryCatch<'p, P>>
source§impl<'s, 'p, P> AsMut<TryCatch<'p, P>> for DisallowJavascriptExecutionScope<'s, TryCatch<'p, P>>
impl<'s, 'p, P> AsMut<TryCatch<'p, P>> for DisallowJavascriptExecutionScope<'s, TryCatch<'p, P>>
source§impl<'s, 'p, 'e> AsMut<TryCatch<'s, EscapableHandleScope<'p, 'e>>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsMut<TryCatch<'s, EscapableHandleScope<'p, 'e>>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§fn as_mut(&mut self) -> &mut TryCatch<'s, EscapableHandleScope<'p, 'e>>
fn as_mut(&mut self) -> &mut TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§impl<'s, 'p, 'e, C> AsMut<TryCatch<'s, EscapableHandleScope<'p, 'e, ()>>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
impl<'s, 'p, 'e, C> AsMut<TryCatch<'s, EscapableHandleScope<'p, 'e, ()>>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
source§impl<'s, 'p, 'e> AsMut<TryCatch<'s, HandleScope<'p>>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsMut<TryCatch<'s, HandleScope<'p>>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§fn as_mut(&mut self) -> &mut TryCatch<'s, HandleScope<'p>>
fn as_mut(&mut self) -> &mut TryCatch<'s, HandleScope<'p>>
source§impl<'s, 'p> AsMut<TryCatch<'s, HandleScope<'p>>> for TryCatch<'s, HandleScope<'p>>
impl<'s, 'p> AsMut<TryCatch<'s, HandleScope<'p>>> for TryCatch<'s, HandleScope<'p>>
source§fn as_mut(&mut self) -> &mut TryCatch<'s, HandleScope<'p>>
fn as_mut(&mut self) -> &mut TryCatch<'s, HandleScope<'p>>
source§impl<'s, 'p, 'e, C> AsMut<TryCatch<'s, HandleScope<'p, ()>>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
impl<'s, 'p, 'e, C> AsMut<TryCatch<'s, HandleScope<'p, ()>>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
source§impl<'s, 'p, C> AsMut<TryCatch<'s, HandleScope<'p, ()>>> for TryCatch<'s, HandleScope<'p, C>>
impl<'s, 'p, C> AsMut<TryCatch<'s, HandleScope<'p, ()>>> for TryCatch<'s, HandleScope<'p, C>>
source§impl<'s, 'p, 'e> AsRef<EscapableHandleScope<'p, 'e>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsRef<EscapableHandleScope<'p, 'e>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§fn as_ref(&self) -> &EscapableHandleScope<'p, 'e>
fn as_ref(&self) -> &EscapableHandleScope<'p, 'e>
source§impl<'s, 'p, 'e, C> AsRef<EscapableHandleScope<'p, 'e, ()>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
impl<'s, 'p, 'e, C> AsRef<EscapableHandleScope<'p, 'e, ()>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
source§fn as_ref(&self) -> &EscapableHandleScope<'p, 'e, ()>
fn as_ref(&self) -> &EscapableHandleScope<'p, 'e, ()>
source§impl<'s, 'p, 'e> AsRef<HandleScope<'p>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsRef<HandleScope<'p>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§fn as_ref(&self) -> &HandleScope<'p>
fn as_ref(&self) -> &HandleScope<'p>
source§impl<'s, 'p> AsRef<HandleScope<'p>> for TryCatch<'s, HandleScope<'p>>
impl<'s, 'p> AsRef<HandleScope<'p>> for TryCatch<'s, HandleScope<'p>>
source§fn as_ref(&self) -> &HandleScope<'p>
fn as_ref(&self) -> &HandleScope<'p>
source§impl<'s, 'p, 'e, C> AsRef<HandleScope<'p, ()>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
impl<'s, 'p, 'e, C> AsRef<HandleScope<'p, ()>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
source§fn as_ref(&self) -> &HandleScope<'p, ()>
fn as_ref(&self) -> &HandleScope<'p, ()>
source§impl<'s, 'p, C> AsRef<HandleScope<'p, ()>> for TryCatch<'s, HandleScope<'p, C>>
impl<'s, 'p, C> AsRef<HandleScope<'p, ()>> for TryCatch<'s, HandleScope<'p, C>>
source§fn as_ref(&self) -> &HandleScope<'p, ()>
fn as_ref(&self) -> &HandleScope<'p, ()>
source§impl<'s, 'p, P> AsRef<TryCatch<'p, P>> for AllowJavascriptExecutionScope<'s, TryCatch<'p, P>>
impl<'s, 'p, P> AsRef<TryCatch<'p, P>> for AllowJavascriptExecutionScope<'s, TryCatch<'p, P>>
source§impl<'s, 'p, P> AsRef<TryCatch<'p, P>> for DisallowJavascriptExecutionScope<'s, TryCatch<'p, P>>
impl<'s, 'p, P> AsRef<TryCatch<'p, P>> for DisallowJavascriptExecutionScope<'s, TryCatch<'p, P>>
source§impl<'s, 'p, 'e> AsRef<TryCatch<'s, EscapableHandleScope<'p, 'e>>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsRef<TryCatch<'s, EscapableHandleScope<'p, 'e>>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§fn as_ref(&self) -> &TryCatch<'s, EscapableHandleScope<'p, 'e>>
fn as_ref(&self) -> &TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§impl<'s, 'p, 'e, C> AsRef<TryCatch<'s, EscapableHandleScope<'p, 'e, ()>>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
impl<'s, 'p, 'e, C> AsRef<TryCatch<'s, EscapableHandleScope<'p, 'e, ()>>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
source§impl<'s, 'p, 'e> AsRef<TryCatch<'s, HandleScope<'p>>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> AsRef<TryCatch<'s, HandleScope<'p>>> for TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§fn as_ref(&self) -> &TryCatch<'s, HandleScope<'p>>
fn as_ref(&self) -> &TryCatch<'s, HandleScope<'p>>
source§impl<'s, 'p> AsRef<TryCatch<'s, HandleScope<'p>>> for TryCatch<'s, HandleScope<'p>>
impl<'s, 'p> AsRef<TryCatch<'s, HandleScope<'p>>> for TryCatch<'s, HandleScope<'p>>
source§fn as_ref(&self) -> &TryCatch<'s, HandleScope<'p>>
fn as_ref(&self) -> &TryCatch<'s, HandleScope<'p>>
source§impl<'s, 'p, 'e, C> AsRef<TryCatch<'s, HandleScope<'p, ()>>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
impl<'s, 'p, 'e, C> AsRef<TryCatch<'s, HandleScope<'p, ()>>> for TryCatch<'s, EscapableHandleScope<'p, 'e, C>>
source§impl<'s, 'p, C> AsRef<TryCatch<'s, HandleScope<'p, ()>>> for TryCatch<'s, HandleScope<'p, C>>
impl<'s, 'p, C> AsRef<TryCatch<'s, HandleScope<'p, ()>>> for TryCatch<'s, HandleScope<'p, C>>
source§impl<'s, 'p, 'e> Deref for TryCatch<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> Deref for TryCatch<'s, EscapableHandleScope<'p, 'e>>
§type Target = EscapableHandleScope<'p, 'e>
type Target = EscapableHandleScope<'p, 'e>
source§impl<'s, 'p> Deref for TryCatch<'s, HandleScope<'p>>
impl<'s, 'p> Deref for TryCatch<'s, HandleScope<'p>>
§type Target = HandleScope<'p>
type Target = HandleScope<'p>
source§impl<'s, 'p, 'e> DerefMut for TryCatch<'s, EscapableHandleScope<'p, 'e>>
impl<'s, 'p, 'e> DerefMut for TryCatch<'s, EscapableHandleScope<'p, 'e>>
source§impl<'s, 'p> DerefMut for TryCatch<'s, HandleScope<'p>>
impl<'s, 'p> DerefMut for TryCatch<'s, HandleScope<'p>>
Auto Trait Implementations§
impl<'s, P> Freeze for TryCatch<'s, P>
impl<'s, P> !RefUnwindSafe for TryCatch<'s, P>
impl<'s, P> !Send for TryCatch<'s, P>
impl<'s, P> !Sync for TryCatch<'s, P>
impl<'s, P> Unpin for TryCatch<'s, P>
impl<'s, P> !UnwindSafe for TryCatch<'s, P>
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.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> ⓘ
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> ⓘ
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 moresource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.