diff options
| author | Mason Reed <mason@vector35.com> | 2025-05-05 13:17:30 -0400 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-05-12 17:45:24 -0400 |
| commit | 9dadf92c16da5cd21def79ae39ca98803c9208ec (patch) | |
| tree | 3874a659bcb3818f43c1a46ab3ef081b99b47154 /rust/src/command.rs | |
| parent | 9f5491a56f6af1fa9b030f23d40150673a52aaa1 (diff) | |
[Rust] Rename `AsCStr` to `IntoCStr`
Diffstat (limited to 'rust/src/command.rs')
| -rw-r--r-- | rust/src/command.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rust/src/command.rs b/rust/src/command.rs index 721f9170..099eafa8 100644 --- a/rust/src/command.rs +++ b/rust/src/command.rs @@ -42,7 +42,7 @@ use std::os::raw::c_void; use crate::binary_view::BinaryView; use crate::function::Function; -use crate::string::AsCStr; +use crate::string::IntoCStr; /// The trait required for generic commands. See [register_command] for example usage. pub trait Command: 'static + Sync { @@ -95,7 +95,7 @@ where /// ``` pub fn register_command<S, C>(name: S, desc: S, command: C) where - S: AsCStr, + S: IntoCStr, C: Command, { extern "C" fn cb_action<C>(ctxt: *mut c_void, view: *mut BNBinaryView) @@ -196,7 +196,7 @@ where /// ``` pub fn register_command_for_address<S, C>(name: S, desc: S, command: C) where - S: AsCStr, + S: IntoCStr, C: AddressCommand, { extern "C" fn cb_action<C>(ctxt: *mut c_void, view: *mut BNBinaryView, addr: u64) @@ -298,7 +298,7 @@ where /// ``` pub fn register_command_for_range<S, C>(name: S, desc: S, command: C) where - S: AsCStr, + S: IntoCStr, C: RangeCommand, { extern "C" fn cb_action<C>(ctxt: *mut c_void, view: *mut BNBinaryView, addr: u64, len: u64) @@ -405,7 +405,7 @@ where /// ``` pub fn register_command_for_function<S, C>(name: S, desc: S, command: C) where - S: AsCStr, + S: IntoCStr, C: FunctionCommand, { extern "C" fn cb_action<C>(ctxt: *mut c_void, view: *mut BNBinaryView, func: *mut BNFunction) |
