Struct Registry

Source
pub struct Registry { /* private fields */ }
Expand description

Fields related to Windows Registry operations.

Implementations§

Source§

impl Registry

Source

pub fn get_hive(&self) -> Option<&String>

Abbreviated name for the hive.

Source

pub fn set_hive(&mut self, hive_arg: String)

Abbreviated name for the hive.

§Example

HKLM

Source

pub fn get_key(&self) -> Option<&String>

Hive-relative path of keys.

Source

pub fn set_key(&mut self, key_arg: String)

Hive-relative path of keys.

§Example

SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe

Source

pub fn get_value(&self) -> Option<&String>

Name of the value written.

Source

pub fn set_value(&mut self, value_arg: String)

Name of the value written.

§Example

Debugger

Source

pub fn get_path(&self) -> Option<&String>

Full path, including hive, key and value

Source

pub fn set_path(&mut self, path_arg: String)

Full path, including hive, key and value

§Example

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\winword.exe\Debugger

Source

pub fn get_data_type(&self) -> Option<&String>

Standard registry type for encoding contents

Source

pub fn set_data_type(&mut self, data_type_arg: String)

Standard registry type for encoding contents

§Example

REG_SZ

Source

pub fn get_data_strings(&self) -> &Vec<String>

Content when writing string types.

Populated as an array when writing string data to the registry. For single string registry types (REG_SZ, REG_EXPAND_SZ), this should be an array with one string. For sequences of string with REG_MULTI_SZ, this array will be variable length. For numeric data, such as REG_DWORD and REG_QWORD, this should be populated with the decimal representation (e.g "1").

Source

pub fn add_data_string(&mut self, data_string_arg: String)

Content when writing string types.

Populated as an array when writing string data to the registry. For single string registry types (REG_SZ, REG_EXPAND_SZ), this should be an array with one string. For sequences of string with REG_MULTI_SZ, this array will be variable length. For numeric data, such as REG_DWORD and REG_QWORD, this should be populated with the decimal representation (e.g "1").

§Example

["C:\rta\red_ttp\bin\myapp.exe"]

Source

pub fn get_data_bytes(&self) -> Option<&String>

Original bytes written with base64 encoding.

For Windows registry operations, such as SetValueEx and RegQueryValueEx, this corresponds to the data pointed by lp_data. This is optional but provides better recoverability and should be populated for REG_BINARY encoded values.

Source

pub fn set_data_bytes(&mut self, data_bytes_arg: String)

Original bytes written with base64 encoding.

For Windows registry operations, such as SetValueEx and RegQueryValueEx, this corresponds to the data pointed by lp_data. This is optional but provides better recoverability and should be populated for REG_BINARY encoded values.

§Example

ZQBuAC0AVQBTAAAAZQBuAAAAAAA=

Trait Implementations§

Source§

impl Clone for Registry

Source§

fn clone(&self) -> Registry

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Registry

Source§

fn default() -> Registry

Returns the “default value” for a type. Read more
Source§

impl Serialize for Registry

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.