Struct trdelnik_client::Commander
source · [−]pub struct Commander { /* private fields */ }Expand description
Commander allows you to start localnet, build programs,
run tests and do other useful operations.
Implementations
sourceimpl Commander
impl Commander
sourcepub fn with_root(root: impl Into<Cow<'static, str>>) -> Self
pub fn with_root(root: impl Into<Cow<'static, str>>) -> Self
Creates a new Commander instance with the provided root.
sourcepub async fn build_programs(&self) -> Result<(), Error>
pub async fn build_programs(&self) -> Result<(), Error>
Builds programs (smart contracts).
sourcepub async fn run_tests(&self) -> Result<(), Error>
pub async fn run_tests(&self) -> Result<(), Error>
Runs standard Rust tests.
Note: The –nocapture argument is used
to allow you read println outputs in your terminal window.
sourcepub async fn create_program_client_crate(&self) -> Result<(), Error>
pub async fn create_program_client_crate(&self) -> Result<(), Error>
Creates the program_client crate.
It’s used internally by the #[trdelnik_test] macro.
sourcepub fn program_packages(&self) -> impl Iterator<Item = Package>
pub fn program_packages(&self) -> impl Iterator<Item = Package>
sourcepub async fn generate_program_client_deps(&self) -> Result<(), Error>
pub async fn generate_program_client_deps(&self) -> Result<(), Error>
Updates the program_client dependencies.
It’s used internally by the #[trdelnik_test] macro.
sourcepub async fn generate_program_client_lib_rs(&self) -> Result<(), Error>
pub async fn generate_program_client_lib_rs(&self) -> Result<(), Error>
Updates the program_client lib.rs.
It’s used internally by the #[trdelnik_test] macro.
sourcepub async fn format_program_code(code: &str) -> Result<String, Error>
pub async fn format_program_code(code: &str) -> Result<String, Error>
Formats program code.
sourcepub async fn start_localnet(&self) -> Result<LocalnetHandle, Error>
pub async fn start_localnet(&self) -> Result<LocalnetHandle, Error>
Starts the localnet (Solana validator).
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Commander
impl Send for Commander
impl Sync for Commander
impl Unpin for Commander
impl UnwindSafe for Commander
Blanket Implementations
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more