pub enum ClientCommand {
Show 40 variants
Transfer {
sender: Account,
recipient: Account,
amount: Amount,
},
OpenChain {
chain_id: Option<ChainId>,
owner: Option<AccountOwner>,
balance: Amount,
},
OpenMultiOwnerChain {
chain_id: Option<ChainId>,
ownership_config: ChainOwnershipConfig,
application_permissions_config: ApplicationPermissionsConfig,
balance: Amount,
},
ChangeOwnership {
chain_id: Option<ChainId>,
ownership_config: ChainOwnershipConfig,
},
SetPreferredOwner {
chain_id: Option<ChainId>,
owner: AccountOwner,
},
ChangeApplicationPermissions {
chain_id: Option<ChainId>,
application_permissions_config: ApplicationPermissionsConfig,
},
CloseChain {
chain_id: ChainId,
},
LocalBalance {
account: Option<Account>,
},
QueryBalance {
account: Option<Account>,
},
SyncBalance {
account: Option<Account>,
},
Sync {
chain_id: Option<ChainId>,
},
ProcessInbox {
chain_id: Option<ChainId>,
},
QueryValidator {
address: String,
chain_id: Option<ChainId>,
public_key: Option<ValidatorPublicKey>,
},
QueryValidators {
chain_id: Option<ChainId>,
},
SyncValidator {
address: String,
chains: Vec<ChainId>,
},
SetValidator {
public_key: ValidatorPublicKey,
account_key: AccountPublicKey,
address: String,
votes: u64,
skip_online_check: bool,
},
RemoveValidator {
public_key: ValidatorPublicKey,
},
RevokeEpochs {
epoch: Epoch,
},
ResourceControlPolicy {Show 31 fields
wasm_fuel_unit: Option<Amount>,
evm_fuel_unit: Option<Amount>,
read_operation: Option<Amount>,
write_operation: Option<Amount>,
byte_read: Option<Amount>,
byte_written: Option<Amount>,
blob_read: Option<Amount>,
blob_published: Option<Amount>,
blob_byte_read: Option<Amount>,
blob_byte_published: Option<Amount>,
byte_stored: Option<Amount>,
operation: Option<Amount>,
operation_byte: Option<Amount>,
message: Option<Amount>,
message_byte: Option<Amount>,
service_as_oracle_query: Option<Amount>,
http_request: Option<Amount>,
maximum_wasm_fuel_per_block: Option<u64>,
maximum_evm_fuel_per_block: Option<u64>,
maximum_service_oracle_execution_ms: Option<u64>,
maximum_block_size: Option<u64>,
maximum_blob_size: Option<u64>,
maximum_published_blobs: Option<u64>,
maximum_bytecode_size: Option<u64>,
maximum_block_proposal_size: Option<u64>,
maximum_bytes_read_per_block: Option<u64>,
maximum_bytes_written_per_block: Option<u64>,
maximum_oracle_response_bytes: Option<u64>,
maximum_http_response_bytes: Option<u64>,
http_request_timeout_ms: Option<u64>,
http_request_allow_list: Option<Vec<String>>,
},
Benchmark(BenchmarkCommand),
MultiBenchmark {
processes: usize,
faucet: String,
ssd_dir: Option<String>,
command: BenchmarkCommand,
delay_between_processes: u64,
},
CreateGenesisConfig {Show 39 fields
committee_config_path: PathBuf,
genesis_config_path: PathBuf,
initial_funding: Amount,
start_timestamp: Option<DateTime<Utc>>,
num_other_initial_chains: u32,
policy_config: ResourceControlPolicyConfig,
wasm_fuel_unit_price: Option<Amount>,
evm_fuel_unit_price: Option<Amount>,
read_operation_price: Option<Amount>,
write_operation_price: Option<Amount>,
byte_read_price: Option<Amount>,
byte_written_price: Option<Amount>,
blob_read_price: Option<Amount>,
blob_published_price: Option<Amount>,
blob_byte_read_price: Option<Amount>,
blob_byte_published_price: Option<Amount>,
byte_stored_price: Option<Amount>,
operation_price: Option<Amount>,
operation_byte_price: Option<Amount>,
message_price: Option<Amount>,
message_byte_price: Option<Amount>,
service_as_oracle_query_price: Option<Amount>,
http_request_price: Option<Amount>,
maximum_wasm_fuel_per_block: Option<u64>,
maximum_evm_fuel_per_block: Option<u64>,
maximum_service_oracle_execution_ms: Option<u64>,
maximum_block_size: Option<u64>,
maximum_bytecode_size: Option<u64>,
maximum_blob_size: Option<u64>,
maximum_published_blobs: Option<u64>,
maximum_block_proposal_size: Option<u64>,
maximum_bytes_read_per_block: Option<u64>,
maximum_bytes_written_per_block: Option<u64>,
maximum_oracle_response_bytes: Option<u64>,
maximum_http_response_bytes: Option<u64>,
http_request_timeout_ms: Option<u64>,
http_request_allow_list: Option<Vec<String>>,
testing_prng_seed: Option<u64>,
network_name: Option<String>,
},
Watch {
chain_id: Option<ChainId>,
raw: bool,
},
Service {
config: ChainListenerConfig,
port: NonZeroU16,
},
Faucet {
chain_id: Option<ChainId>,
port: NonZeroU16,
amount: Amount,
limit_rate_until: Option<DateTime<Utc>>,
config: ChainListenerConfig,
},
PublishModule {
contract: PathBuf,
service: PathBuf,
vm_runtime: VmRuntime,
publisher: Option<ChainId>,
},
ListEventsFromIndex {
chain_id: Option<ChainId>,
stream_id: StreamId,
start_index: u32,
},
PublishDataBlob {
blob_path: PathBuf,
publisher: Option<ChainId>,
},
ReadDataBlob {
hash: CryptoHash,
reader: Option<ChainId>,
},
CreateApplication {
module_id: ModuleId,
creator: Option<ChainId>,
json_parameters: Option<String>,
json_parameters_path: Option<PathBuf>,
json_argument: Option<String>,
json_argument_path: Option<PathBuf>,
required_application_ids: Option<Vec<ApplicationId>>,
},
PublishAndCreate {
contract: PathBuf,
service: PathBuf,
vm_runtime: VmRuntime,
publisher: Option<ChainId>,
json_parameters: Option<String>,
json_parameters_path: Option<PathBuf>,
json_argument: Option<String>,
json_argument_path: Option<PathBuf>,
required_application_ids: Option<Vec<ApplicationId>>,
},
Keygen,
Assign {
owner: AccountOwner,
chain_id: ChainId,
},
RetryPendingBlock {
chain_id: Option<ChainId>,
},
Wallet(WalletCommand),
Project(ProjectCommand),
Net(NetCommand),
Storage(DatabaseToolCommand),
HelpMarkdown,
ExtractScriptFromMarkdown {
path: PathBuf,
pause_after_linera_service: Duration,
pause_after_gql_mutations: Duration,
},
}
Variants§
Transfer
Transfer funds
Fields
OpenChain
Open (i.e. activate) a new chain deriving the UID from an existing one.
Fields
owner: Option<AccountOwner>
The new owner (otherwise create a key pair and remember it)
OpenMultiOwnerChain
Open (i.e. activate) a new multi-owner chain deriving the UID from an existing one.
Fields
ownership_config: ChainOwnershipConfig
application_permissions_config: ApplicationPermissionsConfig
ChangeOwnership
Change who owns the chain, and how the owners work together proposing blocks.
Specify the complete set of new owners, by public key. Existing owners that are not included will be removed.
Fields
ownership_config: ChainOwnershipConfig
SetPreferredOwner
Change the preferred owner of a chain.
Fields
owner: AccountOwner
The new preferred owner.
ChangeApplicationPermissions
Changes the application permissions configuration.
Fields
application_permissions_config: ApplicationPermissionsConfig
CloseChain
Close an existing chain.
A closed chain cannot execute operations or accept messages anymore. It can still reject incoming messages, so they bounce back to the sender.
LocalBalance
Read the current native-token balance of the given account directly from the local state.
NOTE: The local balance does not reflect messages that are waiting to be picked in
the local inbox, or that have not been synchronized from validators yet. Use
linera sync
then either linera query-balance
or linera process-inbox && linera local-balance
for a consolidated balance.
Fields
QueryBalance
Simulate the execution of one block made of pending messages from the local inbox, then read the native-token balance of the account from the local state.
NOTE: The balance does not reflect messages that have not been synchronized from
validators yet. Call linera sync
first to do so.
Fields
SyncBalance
(DEPRECATED) Synchronize the local state of the chain with a quorum validators, then query the local balance.
This command is deprecated. Use linera sync && linera query-balance
instead.
Fields
Sync
Synchronize the local state of the chain with a quorum validators.
Fields
ProcessInbox
Process all pending incoming messages from the inbox of the given chain by creating as many blocks as needed to execute all (non-failing) messages. Failing messages will be marked as rejected and may bounce to their sender depending on their configuration.
Fields
QueryValidator
Show the version and genesis config hash of a new validator, and print a warning if it is incompatible. Also print some information about the given chain while we are at it.
Fields
public_key: Option<ValidatorPublicKey>
The public key of the validator. If given, the signature of the chain query info will be checked.
QueryValidators
Show the current set of validators for a chain. Also print some information about the given chain while we are at it.
Fields
SyncValidator
Synchronizes a validator with the local state of chains.
Fields
SetValidator
Add or modify a validator (admin only)
Fields
public_key: ValidatorPublicKey
The public key of the validator.
account_key: AccountPublicKey
The public key of the account controlled by the validator.
RemoveValidator
Remove a validator (admin only)
Fields
public_key: ValidatorPublicKey
The public key of the validator.
RevokeEpochs
Deprecates all committees up to and including the specified one.
ResourceControlPolicy
View or update the resource control policy
Fields
operation_byte: Option<Amount>
Set the additional price for each byte in the argument of a user operation.
message_byte: Option<Amount>
Set the additional price for each byte in the argument of a user message.
maximum_service_oracle_execution_ms: Option<u64>
Set the maximum time in milliseconds that a block can spend executing services as oracles.
maximum_blob_size: Option<u64>
Set the maximum size of data blobs, compressed bytecode and other binary blobs, in bytes.
maximum_bytecode_size: Option<u64>
Set the maximum size of decompressed contract or service bytecode, in bytes.
Benchmark(BenchmarkCommand)
Start a benchmark, maintaining a given TPS or just sending one transfer per chain in bulk mode.
MultiBenchmark
Runs multiple linera benchmark
processes in parallel.
Fields
ssd_dir: Option<String>
If running on local SSD, specify the directory to store the storage and wallet. If not specified, a temporary directory will be used for each client.
command: BenchmarkCommand
The benchmark command to run.
CreateGenesisConfig
Create genesis configuration for a Linera deployment. Create initial user chains and print information to be used for initialization of validator setup. This will also create an initial wallet for the owner of the initial “root” chains.
Fields
start_timestamp: Option<DateTime<Utc>>
The start timestamp: no blocks can be created before this time.
num_other_initial_chains: u32
Number of initial (aka “root”) chains to create in addition to the admin chain.
policy_config: ResourceControlPolicyConfig
Configure the resource control policy (notably fees) according to pre-defined settings.
wasm_fuel_unit_price: Option<Amount>
Set the price per unit of Wasm fuel.
(This will overwrite value from --policy-config
)
evm_fuel_unit_price: Option<Amount>
Set the price per unit of EVM fuel.
(This will overwrite value from --policy-config
)
read_operation_price: Option<Amount>
Set the price per read operation.
(This will overwrite value from --policy-config
)
write_operation_price: Option<Amount>
Set the price per write operation.
(This will overwrite value from --policy-config
)
byte_read_price: Option<Amount>
Set the price per byte read.
(This will overwrite value from --policy-config
)
byte_written_price: Option<Amount>
Set the price per byte written.
(This will overwrite value from --policy-config
)
blob_read_price: Option<Amount>
Set the base price to read a blob.
(This will overwrite value from --policy-config
)
blob_published_price: Option<Amount>
Set the base price to publish a blob.
(This will overwrite value from --policy-config
)
blob_byte_read_price: Option<Amount>
Set the price to read a blob, per byte.
(This will overwrite value from --policy-config
)
blob_byte_published_price: Option<Amount>
Set the price to publish a blob, per byte.
(This will overwrite value from --policy-config
)
byte_stored_price: Option<Amount>
Set the price per byte stored.
(This will overwrite value from --policy-config
)
operation_price: Option<Amount>
Set the base price of sending an operation from a block..
(This will overwrite value from --policy-config
)
operation_byte_price: Option<Amount>
Set the additional price for each byte in the argument of a user operation.
(This will overwrite value from --policy-config
)
message_price: Option<Amount>
Set the base price of sending a message from a block..
(This will overwrite value from --policy-config
)
message_byte_price: Option<Amount>
Set the additional price for each byte in the argument of a user message.
(This will overwrite value from --policy-config
)
maximum_wasm_fuel_per_block: Option<u64>
Set the maximum amount of Wasm fuel per block.
(This will overwrite value from --policy-config
)
maximum_evm_fuel_per_block: Option<u64>
Set the maximum amount of EVM fuel per block.
(This will overwrite value from --policy-config
)
maximum_service_oracle_execution_ms: Option<u64>
Set the maximum time in milliseconds that a block can spend executing services as oracles.
maximum_block_size: Option<u64>
Set the maximum size of a block.
(This will overwrite value from --policy-config
)
maximum_bytecode_size: Option<u64>
Set the maximum size of decompressed contract or service bytecode, in bytes.
(This will overwrite value from --policy-config
)
maximum_blob_size: Option<u64>
Set the maximum size of data blobs, compressed bytecode and other binary blobs,
in bytes.
(This will overwrite value from --policy-config
)
maximum_published_blobs: Option<u64>
Set the maximum number of published blobs per block.
(This will overwrite value from --policy-config
)
maximum_block_proposal_size: Option<u64>
Set the maximum size of a block proposal, in bytes.
(This will overwrite value from --policy-config
)
maximum_bytes_read_per_block: Option<u64>
Set the maximum read data per block.
(This will overwrite value from --policy-config
)
maximum_bytes_written_per_block: Option<u64>
Set the maximum write data per block.
(This will overwrite value from --policy-config
)
maximum_oracle_response_bytes: Option<u64>
Set the maximum size of oracle responses.
(This will overwrite value from --policy-config
)
http_request_timeout_ms: Option<u64>
Set the maximum amount of time allowed to wait for an HTTP response.
http_request_allow_list: Option<Vec<String>>
Set the list of hosts that contracts and services can send HTTP requests to.
Watch
Watch the network for notifications.
Fields
Service
Run a GraphQL service to explore and extend the chains of the wallet.
Faucet
Run a GraphQL service that exposes a faucet where users can claim tokens. This gives away the chain’s tokens, and is mainly intended for testing.
Fields
port: NonZeroU16
The port on which to run the server
limit_rate_until: Option<DateTime<Utc>>
The end timestamp: The faucet will rate-limit the token supply so it runs out of money no earlier than this.
config: ChainListenerConfig
Configuration for the faucet chain listener.
PublishModule
Publish module.
Fields
ListEventsFromIndex
Print events from a specific chain and stream from a specified index.
Fields
PublishDataBlob
Publish a data blob of binary data.
Fields
ReadDataBlob
Verify that a data blob is readable.
Fields
hash: CryptoHash
The hash of the content.
CreateApplication
Create an application.
Fields
creator: Option<ChainId>
An optional chain ID to host the application. The default chain of the wallet is used otherwise.
required_application_ids: Option<Vec<ApplicationId>>
The list of required dependencies of application, if any.
PublishAndCreate
Create an application, and publish the required module.
Fields
publisher: Option<ChainId>
An optional chain ID to publish the module. The default chain of the wallet is used otherwise.
required_application_ids: Option<Vec<ApplicationId>>
The list of required dependencies of application, if any.
Keygen
Create an unassigned key pair.
Assign
Link the owner to the chain.
Expects that the caller has a private key corresponding to the public_key
,
otherwise block proposals will fail when signing with it.
RetryPendingBlock
Retry a block we unsuccessfully tried to propose earlier.
As long as a block is pending most other commands will fail, since it is unsafe to propose multiple blocks at the same height.
Fields
Wallet(WalletCommand)
Show the contents of the wallet.
Project(ProjectCommand)
Manage Linera projects.
Net(NetCommand)
Manage a local Linera Network.
Storage(DatabaseToolCommand)
Operation on the storage.
HelpMarkdown
Print CLI help in Markdown format, and exit.
ExtractScriptFromMarkdown
Extract a Bash and GraphQL script embedded in a markdown file and print it on
stdout
.
Implementations§
Source§impl ClientCommand
impl ClientCommand
Sourcepub fn log_file_name(&self) -> Cow<'static, str>
pub fn log_file_name(&self) -> Cow<'static, str>
Returns the log file name to use based on the ClientCommand
that will run.
Trait Implementations§
Source§impl Clone for ClientCommand
impl Clone for ClientCommand
Source§fn clone(&self) -> ClientCommand
fn clone(&self) -> ClientCommand
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl FromArgMatches for ClientCommand
impl FromArgMatches for ClientCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§impl Subcommand for ClientCommand
impl Subcommand for ClientCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self
can parse a specific subcommandAuto Trait Implementations§
impl Freeze for ClientCommand
impl RefUnwindSafe for ClientCommand
impl Send for ClientCommand
impl Sync for ClientCommand
impl Unpin for ClientCommand
impl UnwindSafe for ClientCommand
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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,
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T> MockResults for T
impl<T> MockResults for T
Source§type Results = T
type Results = T
MockInstance
.Source§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<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length
bytes from memory from the provided location
.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes
to memory at the provided location
.
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.