pub struct Contract {
pub state: VersionedState<State>,
}Fields§
§state: VersionedState<State>Implementations§
Source§impl Contract
impl Contract
Sourcepub fn ext(account_id: AccountId) -> ContractExt
pub fn ext(account_id: AccountId) -> ContractExt
API for calling this contract’s functions in a subsequent execution.
pub fn ext_on(promise: Promise) -> ContractExt
Sourcepub fn ext_self() -> ContractExt
pub fn ext_self() -> ContractExt
Convenience method for creating a cross-contract call to the current contract.
Equivalent to Self::ext(near_sdk::env::current_account_id()).
Source§impl Contract
impl Contract
pub fn contract_source_metadata()
Source§impl Contract
impl Contract
pub const GAS_FOR_PYTH_REQUEST: Gas
pub const GAS_FOR_PYTH_LAZER_REQUEST: Gas
pub const GAS_FOR_REDSONE_REQUEST: Gas
pub const GAS_FOR_MIGRATE: Gas
pub const GAS_FOR_LIST_00_ENTRY: Gas
pub const GAS_FOR_UPDATE_01_CALLBACK: Gas
Sourcepub fn new(owner_id: Option<AccountId>) -> Contract
pub fn new(owner_id: Option<AccountId>) -> Contract
Initialize the oracle, owned by owner_id if given, otherwise by the
deployer (predecessor).
pub fn list_proxies( &self, offset: Option<u32>, count: Option<u32>, ) -> Vec<PriceIdentifier>
pub fn get_proxy(&self, id: PriceIdentifier) -> Option<Proxy<Source>>
pub fn get_proxy_circuit_breaker_set( &self, id: PriceIdentifier, ) -> Option<CircuitBreakerSet>
pub fn get_cached_proxy_price( &self, id: PriceIdentifier, ) -> Option<CachedProxyPrice>
pub fn list_cached_proxy_prices( &self, price_ids: Vec<PriceIdentifier>, ) -> HashMap<PriceIdentifier, Option<CachedProxyPrice>>
pub fn price_feed_exists(&self, price_identifier: PriceIdentifier) -> bool
pub fn list_ema_prices_no_older_than( &self, price_ids: Vec<PriceIdentifier>, age: u64, ) -> OracleResponse
pub fn update_prices( &mut self, price_ids: Vec<PriceIdentifier>, ) -> PromiseOrValue<HashMap<PriceIdentifier, CachedProxyPriceStatus>>
pub fn update_prices_01_consume_results( &mut self, oracle_order: Vec<OracleType>, invoked: Vec<PendingProxyPriceUpdate>, results: HashMap<PriceIdentifier, CachedProxyPriceStatus>, ) -> HashMap<PriceIdentifier, CachedProxyPriceStatus>
Methods from Deref<Target = State>§
pub fn list_proxies( &self, offset: Option<u32>, count: Option<u32>, ) -> Vec<PriceIdentifier>
pub fn get_proxy(&self, id: PriceIdentifier) -> Option<Proxy<Source>>
pub fn proxy_exists(&self, id: &PriceIdentifier) -> bool
pub fn get_proxy_circuit_breaker_set( &self, id: PriceIdentifier, ) -> Option<CircuitBreakerSet>
pub fn get_cached_proxy_price( &self, id: PriceIdentifier, ) -> Option<CachedProxyPrice>
pub fn list_cached_proxy_prices( &self, price_ids: Vec<PriceIdentifier>, ) -> HashMap<PriceIdentifier, Option<CachedProxyPrice>>
pub fn cache_epoch(&self, id: PriceIdentifier) -> u64
pub fn validated_proxy_entry( &self, id: PriceIdentifier, ) -> Result<Option<ProxyEntry<'_>>, CircuitBreakerSetParseError>
pub fn proxy_entry(&self, id: PriceIdentifier) -> Option<ProxyEntry<'_>>
pub fn proxy_entry_mut( &mut self, id: PriceIdentifier, ) -> Option<ProxyEntryMut<'_>>
pub fn cache_price_update_failure( &mut self, id: PriceIdentifier, now: Nanoseconds, message: String, ) -> CachedProxyPriceStatus
pub fn set_proxy(&mut self, id: PriceIdentifier, proxy: Option<Proxy<Source>>)
pub fn finish_price_update_if_current<F>( &mut self, pending: PendingProxyPriceUpdate, now: Nanoseconds, f: F, ) -> Option<CachedProxyPriceStatus>
Trait Implementations§
Source§impl BorshDeserialize for Contract
impl BorshDeserialize for Contract
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSchema for Contract
impl BorshSchema for Contract
Source§fn declaration() -> Declaration
fn declaration() -> Declaration
Get the name of the type without brackets.
Source§fn add_definitions_recursively(
definitions: &mut BTreeMap<Declaration, Definition>,
)
fn add_definitions_recursively( definitions: &mut BTreeMap<Declaration, Definition>, )
Recursively, using DFS, add type definitions required for this type.
Type definition partially explains how to serialize/deserialize a type.
Source§impl ContractState for Contract
impl ContractState for Contract
fn state_key() -> &'static [u8] ⓘ
fn state_exists() -> bool
fn state_read() -> Option<Self>where
Self: BorshDeserialize,
fn state_write(&self) -> boolwhere
Self: BorshSerialize,
Source§impl MigrateExternalInterface for Contract
impl MigrateExternalInterface for Contract
fn get_stored_state_version() -> u32
fn get_target_state_version() -> u32
fn needs_migration() -> bool
Source§impl OwnerExternal for Contract
impl OwnerExternal for Contract
Source§fn own_get_owner(&self) -> Option<AccountId>
fn own_get_owner(&self) -> Option<AccountId>
Returns the account ID of the current owner.
Source§fn own_get_proposed_owner(&self) -> Option<AccountId>
fn own_get_proposed_owner(&self) -> Option<AccountId>
Returns the account ID that the current owner has proposed take over ownership.
Source§fn own_renounce_owner(&mut self)
fn own_renounce_owner(&mut self)
Current owner may call this function to renounce ownership, setting
current owner to
None. Read moreSource§fn own_propose_owner(&mut self, account_id: Option<AccountId>)
fn own_propose_owner(&mut self, account_id: Option<AccountId>)
Propose a new owner. Can only be called by the current owner.
Source§fn own_accept_owner(&mut self)
fn own_accept_owner(&mut self)
The proposed owner may call this function to accept ownership from the
previous owner.
Source§impl OwnerInternal for Contract
impl OwnerInternal for Contract
§fn slot_is_initialized() -> Slot<bool>
fn slot_is_initialized() -> Slot<bool>
Storage slot for initialization state
§fn slot_owner() -> Slot<AccountId>
fn slot_owner() -> Slot<AccountId>
Storage slot for owner account ID
§fn slot_proposed_owner() -> Slot<AccountId>
fn slot_proposed_owner() -> Slot<AccountId>
Storage slot for proposed owner account ID
Source§impl ProxyOracleAdminInterface for Contract
impl ProxyOracleAdminInterface for Contract
fn admin_set_proxy(&mut self, id: PriceIdentifier, proxy: Option<Proxy<Source>>)
fn admin_configure_circuit_breakers( &mut self, id: PriceIdentifier, config: CircuitBreakerSetConfig, )
fn admin_add_circuit_breaker( &mut self, id: PriceIdentifier, breaker_id: u32, breaker: CircuitBreaker, )
fn admin_remove_circuit_breaker(&mut self, id: PriceIdentifier, breaker_id: u32)
fn admin_set_manual_trip( &mut self, id: PriceIdentifier, is_manually_tripped: bool, metadata: Option<Base64VecU8>, )
fn admin_rearm( &mut self, id: PriceIdentifier, breaker_id: u32, arming_delay_ns: Nanoseconds, )
fn admin_set_enforced( &mut self, id: PriceIdentifier, breaker_id: u32, is_enforced: bool, )
fn admin_upgrade( &mut self, code: UpgradeSource, migrate_args: Base64VecU8, ) -> Promise
Auto Trait Implementations§
impl Freeze for Contract
impl RefUnwindSafe for Contract
impl Send for Contract
impl Sync for Contract
impl Unpin for Contract
impl UnwindSafe for Contract
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
§impl<T> Conv for T
impl<T> Conv 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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Causes
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,
Formats each item in a sequence. Read more
§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> 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>
Converts
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>
Converts
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> Owner for Twhere
T: OwnerInternal,
impl<T> Owner for Twhere
T: OwnerInternal,
§fn update_owner(&mut self, new: Option<AccountId>)
fn update_owner(&mut self, new: Option<AccountId>)
Updates the current owner and emits relevant event.
§fn update_proposed(&mut self, new: Option<AccountId>)
fn update_proposed(&mut self, new: Option<AccountId>)
Updates proposed owner and emits relevant event.
§fn update_owner_unchecked(&mut self, new: Option<AccountId>)
fn update_owner_unchecked(&mut self, new: Option<AccountId>)
Updates the current owner without any checks or emitting events.
§fn update_proposed_unchecked(&mut self, new: Option<AccountId>)
fn update_proposed_unchecked(&mut self, new: Option<AccountId>)
Updates proposed owner without any checks or emitting events.
§fn assert_owner(&self)
fn assert_owner(&self)
Same as
require_owner but as a method.§fn init(&mut self, owner_id: &AccountId)
fn init(&mut self, owner_id: &AccountId)
Initializes the contract owner. Can only be called once. Read more
§fn require_owner()
fn require_owner()
Requires the predecessor to be the owner. Read more
§fn renounce_owner(&mut self)
fn renounce_owner(&mut self)
Removes the contract’s owner. Can only be called by the current owner. Read more
§fn propose_owner(&mut self, account_id: Option<AccountId>)
fn propose_owner(&mut self, account_id: Option<AccountId>)
Prepares the contract to change owners, setting the proposed owner to
the provided account ID. Can only be called by the current owner. Read more
§fn accept_owner(&mut self)
fn accept_owner(&mut self)
Sets new owner equal to proposed owner. Can only be called by proposed
owner. 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,
Pipes by value. This is generally the method you want to use. Read more
§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,
Borrows
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,
Mutably borrows
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
Borrows
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
Mutably borrows
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
Borrows
self, then passes self.deref() into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
fn propagate_header(self, header: HeaderName) -> PropagateHeader<Self>where
Self: Sized,
Propagate a header from the request to the response. Read more
§fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
fn add_extension<T>(self, value: T) -> AddExtension<Self, T>where
Self: Sized,
Add some shareable value to request extensions. Read more
§fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
fn map_request_body<F>(self, f: F) -> MapRequestBody<Self, F>where
Self: Sized,
Apply a transformation to the request body. Read more
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn compression(self) -> Compression<Self>where
Self: Sized,
fn compression(self) -> Compression<Self>where
Self: Sized,
Compresses response bodies. Read more
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more
§fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
fn follow_redirects(self) -> FollowRedirect<Self>where
Self: Sized,
§fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
fn sensitive_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<SetSensitiveResponseHeaders<Self>>where
Self: Sized,
§fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
fn sensitive_request_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveRequestHeaders<Self>where
Self: Sized,
§fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
fn sensitive_response_headers(
self,
headers: impl IntoIterator<Item = HeaderName>,
) -> SetSensitiveResponseHeaders<Self>where
Self: Sized,
§fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn override_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Insert a header into the request. Read more
§fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn append_request_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Append a header into the request. Read more
§fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
fn insert_request_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetRequestHeader<Self, M>where
Self: Sized,
Insert a header into the request, if the header is not already present. Read more
§fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn override_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Insert a header into the response. Read more
§fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn append_response_header<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Append a header into the response. Read more
§fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
fn insert_response_header_if_not_present<M>(
self,
header_name: HeaderName,
make: M,
) -> SetResponseHeader<Self, M>where
Self: Sized,
Insert a header into the response, if the header is not already present. Read more
§fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_request_id<M>(
self,
header_name: HeaderName,
make_request_id: M,
) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Add request id header and extension. Read more
§fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
fn set_x_request_id<M>(self, make_request_id: M) -> SetRequestId<Self, M>where
Self: Sized,
M: MakeRequestId,
Add request id header and extension, using
x-request-id as the header name. Read more§fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_request_id(
self,
header_name: HeaderName,
) -> PropagateRequestId<Self>where
Self: Sized,
Propgate request ids from requests to responses. Read more
§fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
fn propagate_x_request_id(self) -> PropagateRequestId<Self>where
Self: Sized,
Propgate request ids from requests to responses, using
x-request-id as the header name. Read more§fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
fn catch_panic(self) -> CatchPanic<Self, DefaultResponseForPanic>where
Self: Sized,
Catch panics and convert them into
500 Internal Server responses. Read more§fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
fn request_body_limit(self, limit: usize) -> RequestBodyLimit<Self>where
Self: Sized,
Intercept requests with over-sized payloads and convert them into
413 Payload Too Large responses. Read more§fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn trim_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
Remove trailing slashes from paths. Read more
§fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
fn append_trailing_slash(self) -> NormalizePath<Self>where
Self: Sized,
Append trailing slash to paths. Read more
§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
Immutable access to the
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
Mutable access to the
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
Immutable access to the
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
Mutable access to the
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
Immutable access to the
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
Mutable access to the
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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.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
Calls
.tap_deref() only in debug builds, and is erased in release
builds.