pub struct TimelockInstance<T, P, N = Ethereum> {
address: Address,
provider: P,
_network_transport: PhantomData<(N, T)>,
}
Expand description
A Timelock
instance.
Contains type-safe methods for interacting with an on-chain instance of the
[`Timelock`](self) contract located at a given `address`, using a given
provider `P`.
If the contract bytecode is available (see the [`sol!`](alloy_sol_types::sol!)
documentation on how to provide it), the `deploy` and `deploy_builder` methods can
be used to deploy a new instance of the contract.
See the [module-level documentation](self) for all the available methods.
Fields§
§address: Address
§provider: P
§_network_transport: PhantomData<(N, T)>
Implementations§
Source§impl<T: Transport + Clone, P: Provider<T, N>, N: Network> TimelockInstance<T, P, N>
Instantiation and getters/setters.
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> TimelockInstance<T, P, N>
Instantiation and getters/setters.
Sourcepub const fn new(address: Address, provider: P) -> Self
pub const fn new(address: Address, provider: P) -> Self
Creates a new wrapper around an on-chain Timelock
contract instance.
See the [wrapper's documentation](`TimelockInstance`) for more details.
Sourcepub async fn deploy(
provider: P,
minDelay: U256,
proposers: Vec<Address>,
executors: Vec<Address>,
admin: Address,
) -> Result<TimelockInstance<T, P, N>>
pub async fn deploy( provider: P, minDelay: U256, proposers: Vec<Address>, executors: Vec<Address>, admin: Address, ) -> Result<TimelockInstance<T, P, N>>
Deploys this contract using the given provider
and constructor arguments, if any.
Returns a new instance of the contract, if the deployment was successful.
For more fine-grained control over the deployment process, use [`deploy_builder`] instead.
Sourcepub fn deploy_builder(
provider: P,
minDelay: U256,
proposers: Vec<Address>,
executors: Vec<Address>,
admin: Address,
) -> RawCallBuilder<T, P, N>
pub fn deploy_builder( provider: P, minDelay: U256, proposers: Vec<Address>, executors: Vec<Address>, admin: Address, ) -> RawCallBuilder<T, P, N>
Creates a RawCallBuilder
for deploying this contract using the given provider
and constructor arguments, if any.
This is a simple wrapper around creating a `RawCallBuilder` with the data set to
the bytecode concatenated with the constructor's ABI-encoded arguments.
Sourcepub fn set_address(&mut self, address: Address)
pub fn set_address(&mut self, address: Address)
Sets the address.
Source§impl<T, P: Clone, N> TimelockInstance<T, &P, N>
impl<T, P: Clone, N> TimelockInstance<T, &P, N>
Sourcepub fn with_cloned_provider(self) -> TimelockInstance<T, P, N>
pub fn with_cloned_provider(self) -> TimelockInstance<T, P, N>
Clones the provider and returns a new instance with the cloned provider.
Source§impl<T: Transport + Clone, P: Provider<T, N>, N: Network> TimelockInstance<T, P, N>
Function calls.
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> TimelockInstance<T, P, N>
Function calls.
Sourcepub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<T, &P, C, N>
pub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<T, &P, C, N>
Creates a new call builder using this contract instance’s provider and address.
Note that the call can be any function call, not just those defined in this contract. Prefer using the other methods for building type-safe contract calls.
Sourcepub fn CANCELLER_ROLE(&self) -> SolCallBuilder<T, &P, CANCELLER_ROLECall, N>
pub fn CANCELLER_ROLE(&self) -> SolCallBuilder<T, &P, CANCELLER_ROLECall, N>
Creates a new call builder for the [CANCELLER_ROLE
] function.
Sourcepub fn DEFAULT_ADMIN_ROLE(
&self,
) -> SolCallBuilder<T, &P, DEFAULT_ADMIN_ROLECall, N>
pub fn DEFAULT_ADMIN_ROLE( &self, ) -> SolCallBuilder<T, &P, DEFAULT_ADMIN_ROLECall, N>
Creates a new call builder for the [DEFAULT_ADMIN_ROLE
] function.
Sourcepub fn EXECUTOR_ROLE(&self) -> SolCallBuilder<T, &P, EXECUTOR_ROLECall, N>
pub fn EXECUTOR_ROLE(&self) -> SolCallBuilder<T, &P, EXECUTOR_ROLECall, N>
Creates a new call builder for the [EXECUTOR_ROLE
] function.
Sourcepub fn PROPOSER_ROLE(&self) -> SolCallBuilder<T, &P, PROPOSER_ROLECall, N>
pub fn PROPOSER_ROLE(&self) -> SolCallBuilder<T, &P, PROPOSER_ROLECall, N>
Creates a new call builder for the [PROPOSER_ROLE
] function.
Sourcepub fn cancel(&self, id: FixedBytes<32>) -> SolCallBuilder<T, &P, cancelCall, N>
pub fn cancel(&self, id: FixedBytes<32>) -> SolCallBuilder<T, &P, cancelCall, N>
Creates a new call builder for the [cancel
] function.
Sourcepub fn execute(
&self,
target: Address,
value: U256,
payload: Bytes,
predecessor: FixedBytes<32>,
salt: FixedBytes<32>,
) -> SolCallBuilder<T, &P, executeCall, N>
pub fn execute( &self, target: Address, value: U256, payload: Bytes, predecessor: FixedBytes<32>, salt: FixedBytes<32>, ) -> SolCallBuilder<T, &P, executeCall, N>
Creates a new call builder for the [execute
] function.
Sourcepub fn executeBatch(
&self,
targets: Vec<Address>,
values: Vec<U256>,
payloads: Vec<Bytes>,
predecessor: FixedBytes<32>,
salt: FixedBytes<32>,
) -> SolCallBuilder<T, &P, executeBatchCall, N>
pub fn executeBatch( &self, targets: Vec<Address>, values: Vec<U256>, payloads: Vec<Bytes>, predecessor: FixedBytes<32>, salt: FixedBytes<32>, ) -> SolCallBuilder<T, &P, executeBatchCall, N>
Creates a new call builder for the [executeBatch
] function.
Sourcepub fn getMinDelay(&self) -> SolCallBuilder<T, &P, getMinDelayCall, N>
pub fn getMinDelay(&self) -> SolCallBuilder<T, &P, getMinDelayCall, N>
Creates a new call builder for the [getMinDelay
] function.
Sourcepub fn getOperationState(
&self,
id: FixedBytes<32>,
) -> SolCallBuilder<T, &P, getOperationStateCall, N>
pub fn getOperationState( &self, id: FixedBytes<32>, ) -> SolCallBuilder<T, &P, getOperationStateCall, N>
Creates a new call builder for the [getOperationState
] function.
Sourcepub fn getRoleAdmin(
&self,
role: FixedBytes<32>,
) -> SolCallBuilder<T, &P, getRoleAdminCall, N>
pub fn getRoleAdmin( &self, role: FixedBytes<32>, ) -> SolCallBuilder<T, &P, getRoleAdminCall, N>
Creates a new call builder for the [getRoleAdmin
] function.
Sourcepub fn getTimestamp(
&self,
id: FixedBytes<32>,
) -> SolCallBuilder<T, &P, getTimestampCall, N>
pub fn getTimestamp( &self, id: FixedBytes<32>, ) -> SolCallBuilder<T, &P, getTimestampCall, N>
Creates a new call builder for the [getTimestamp
] function.
Sourcepub fn grantRole(
&self,
role: FixedBytes<32>,
account: Address,
) -> SolCallBuilder<T, &P, grantRoleCall, N>
pub fn grantRole( &self, role: FixedBytes<32>, account: Address, ) -> SolCallBuilder<T, &P, grantRoleCall, N>
Creates a new call builder for the [grantRole
] function.
Sourcepub fn hasRole(
&self,
role: FixedBytes<32>,
account: Address,
) -> SolCallBuilder<T, &P, hasRoleCall, N>
pub fn hasRole( &self, role: FixedBytes<32>, account: Address, ) -> SolCallBuilder<T, &P, hasRoleCall, N>
Creates a new call builder for the [hasRole
] function.
Sourcepub fn hashOperation(
&self,
target: Address,
value: U256,
data: Bytes,
predecessor: FixedBytes<32>,
salt: FixedBytes<32>,
) -> SolCallBuilder<T, &P, hashOperationCall, N>
pub fn hashOperation( &self, target: Address, value: U256, data: Bytes, predecessor: FixedBytes<32>, salt: FixedBytes<32>, ) -> SolCallBuilder<T, &P, hashOperationCall, N>
Creates a new call builder for the [hashOperation
] function.
Sourcepub fn hashOperationBatch(
&self,
targets: Vec<Address>,
values: Vec<U256>,
payloads: Vec<Bytes>,
predecessor: FixedBytes<32>,
salt: FixedBytes<32>,
) -> SolCallBuilder<T, &P, hashOperationBatchCall, N>
pub fn hashOperationBatch( &self, targets: Vec<Address>, values: Vec<U256>, payloads: Vec<Bytes>, predecessor: FixedBytes<32>, salt: FixedBytes<32>, ) -> SolCallBuilder<T, &P, hashOperationBatchCall, N>
Creates a new call builder for the [hashOperationBatch
] function.
Sourcepub fn isOperation(
&self,
id: FixedBytes<32>,
) -> SolCallBuilder<T, &P, isOperationCall, N>
pub fn isOperation( &self, id: FixedBytes<32>, ) -> SolCallBuilder<T, &P, isOperationCall, N>
Creates a new call builder for the [isOperation
] function.
Sourcepub fn isOperationDone(
&self,
id: FixedBytes<32>,
) -> SolCallBuilder<T, &P, isOperationDoneCall, N>
pub fn isOperationDone( &self, id: FixedBytes<32>, ) -> SolCallBuilder<T, &P, isOperationDoneCall, N>
Creates a new call builder for the [isOperationDone
] function.
Sourcepub fn isOperationPending(
&self,
id: FixedBytes<32>,
) -> SolCallBuilder<T, &P, isOperationPendingCall, N>
pub fn isOperationPending( &self, id: FixedBytes<32>, ) -> SolCallBuilder<T, &P, isOperationPendingCall, N>
Creates a new call builder for the [isOperationPending
] function.
Sourcepub fn isOperationReady(
&self,
id: FixedBytes<32>,
) -> SolCallBuilder<T, &P, isOperationReadyCall, N>
pub fn isOperationReady( &self, id: FixedBytes<32>, ) -> SolCallBuilder<T, &P, isOperationReadyCall, N>
Creates a new call builder for the [isOperationReady
] function.
Sourcepub fn onERC1155BatchReceived(
&self,
_0: Address,
_1: Address,
_2: Vec<U256>,
_3: Vec<U256>,
_4: Bytes,
) -> SolCallBuilder<T, &P, onERC1155BatchReceivedCall, N>
pub fn onERC1155BatchReceived( &self, _0: Address, _1: Address, _2: Vec<U256>, _3: Vec<U256>, _4: Bytes, ) -> SolCallBuilder<T, &P, onERC1155BatchReceivedCall, N>
Creates a new call builder for the [onERC1155BatchReceived
] function.
Sourcepub fn onERC1155Received(
&self,
_0: Address,
_1: Address,
_2: U256,
_3: U256,
_4: Bytes,
) -> SolCallBuilder<T, &P, onERC1155ReceivedCall, N>
pub fn onERC1155Received( &self, _0: Address, _1: Address, _2: U256, _3: U256, _4: Bytes, ) -> SolCallBuilder<T, &P, onERC1155ReceivedCall, N>
Creates a new call builder for the [onERC1155Received
] function.
Sourcepub fn onERC721Received(
&self,
_0: Address,
_1: Address,
_2: U256,
_3: Bytes,
) -> SolCallBuilder<T, &P, onERC721ReceivedCall, N>
pub fn onERC721Received( &self, _0: Address, _1: Address, _2: U256, _3: Bytes, ) -> SolCallBuilder<T, &P, onERC721ReceivedCall, N>
Creates a new call builder for the [onERC721Received
] function.
Sourcepub fn renounceRole(
&self,
role: FixedBytes<32>,
callerConfirmation: Address,
) -> SolCallBuilder<T, &P, renounceRoleCall, N>
pub fn renounceRole( &self, role: FixedBytes<32>, callerConfirmation: Address, ) -> SolCallBuilder<T, &P, renounceRoleCall, N>
Creates a new call builder for the [renounceRole
] function.
Sourcepub fn revokeRole(
&self,
role: FixedBytes<32>,
account: Address,
) -> SolCallBuilder<T, &P, revokeRoleCall, N>
pub fn revokeRole( &self, role: FixedBytes<32>, account: Address, ) -> SolCallBuilder<T, &P, revokeRoleCall, N>
Creates a new call builder for the [revokeRole
] function.
Sourcepub fn schedule(
&self,
target: Address,
value: U256,
data: Bytes,
predecessor: FixedBytes<32>,
salt: FixedBytes<32>,
delay: U256,
) -> SolCallBuilder<T, &P, scheduleCall, N>
pub fn schedule( &self, target: Address, value: U256, data: Bytes, predecessor: FixedBytes<32>, salt: FixedBytes<32>, delay: U256, ) -> SolCallBuilder<T, &P, scheduleCall, N>
Creates a new call builder for the [schedule
] function.
Sourcepub fn scheduleBatch(
&self,
targets: Vec<Address>,
values: Vec<U256>,
payloads: Vec<Bytes>,
predecessor: FixedBytes<32>,
salt: FixedBytes<32>,
delay: U256,
) -> SolCallBuilder<T, &P, scheduleBatchCall, N>
pub fn scheduleBatch( &self, targets: Vec<Address>, values: Vec<U256>, payloads: Vec<Bytes>, predecessor: FixedBytes<32>, salt: FixedBytes<32>, delay: U256, ) -> SolCallBuilder<T, &P, scheduleBatchCall, N>
Creates a new call builder for the [scheduleBatch
] function.
Sourcepub fn supportsInterface(
&self,
interfaceId: FixedBytes<4>,
) -> SolCallBuilder<T, &P, supportsInterfaceCall, N>
pub fn supportsInterface( &self, interfaceId: FixedBytes<4>, ) -> SolCallBuilder<T, &P, supportsInterfaceCall, N>
Creates a new call builder for the [supportsInterface
] function.
Sourcepub fn updateDelay(
&self,
newDelay: U256,
) -> SolCallBuilder<T, &P, updateDelayCall, N>
pub fn updateDelay( &self, newDelay: U256, ) -> SolCallBuilder<T, &P, updateDelayCall, N>
Creates a new call builder for the [updateDelay
] function.
Source§impl<T: Transport + Clone, P: Provider<T, N>, N: Network> TimelockInstance<T, P, N>
Event filters.
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> TimelockInstance<T, P, N>
Event filters.
Sourcepub fn event_filter<E: SolEvent>(&self) -> Event<T, &P, E, N>
pub fn event_filter<E: SolEvent>(&self) -> Event<T, &P, E, N>
Creates a new event filter using this contract instance’s provider and address.
Note that the type can be any event, not just those defined in this contract. Prefer using the other methods for building type-safe event filters.
Sourcepub fn CallExecuted_filter(&self) -> Event<T, &P, CallExecuted, N>
pub fn CallExecuted_filter(&self) -> Event<T, &P, CallExecuted, N>
Creates a new event filter for the CallExecuted
event.
Sourcepub fn CallSalt_filter(&self) -> Event<T, &P, CallSalt, N>
pub fn CallSalt_filter(&self) -> Event<T, &P, CallSalt, N>
Creates a new event filter for the CallSalt
event.
Sourcepub fn CallScheduled_filter(&self) -> Event<T, &P, CallScheduled, N>
pub fn CallScheduled_filter(&self) -> Event<T, &P, CallScheduled, N>
Creates a new event filter for the CallScheduled
event.
Sourcepub fn Cancelled_filter(&self) -> Event<T, &P, Cancelled, N>
pub fn Cancelled_filter(&self) -> Event<T, &P, Cancelled, N>
Creates a new event filter for the Cancelled
event.
Sourcepub fn MinDelayChange_filter(&self) -> Event<T, &P, MinDelayChange, N>
pub fn MinDelayChange_filter(&self) -> Event<T, &P, MinDelayChange, N>
Creates a new event filter for the MinDelayChange
event.
Sourcepub fn RoleAdminChanged_filter(&self) -> Event<T, &P, RoleAdminChanged, N>
pub fn RoleAdminChanged_filter(&self) -> Event<T, &P, RoleAdminChanged, N>
Creates a new event filter for the RoleAdminChanged
event.
Sourcepub fn RoleGranted_filter(&self) -> Event<T, &P, RoleGranted, N>
pub fn RoleGranted_filter(&self) -> Event<T, &P, RoleGranted, N>
Creates a new event filter for the RoleGranted
event.
Sourcepub fn RoleRevoked_filter(&self) -> Event<T, &P, RoleRevoked, N>
pub fn RoleRevoked_filter(&self) -> Event<T, &P, RoleRevoked, N>
Creates a new event filter for the RoleRevoked
event.
Trait Implementations§
Auto Trait Implementations§
impl<T, P, N> Freeze for TimelockInstance<T, P, N>where
P: Freeze,
impl<T, P, N> RefUnwindSafe for TimelockInstance<T, P, N>
impl<T, P, N> Send for TimelockInstance<T, P, N>
impl<T, P, N> Sync for TimelockInstance<T, P, N>
impl<T, P, N> Unpin for TimelockInstance<T, P, N>
impl<T, P, N> UnwindSafe for TimelockInstance<T, P, N>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§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.§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.§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.§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.§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.§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.§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.§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.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§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 more§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 more§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
§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
§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.§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.§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.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§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 more§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 more§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 more§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 more§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 more§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 more§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.§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.§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.§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.§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.§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.§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.