pub struct ScriptData {
pub name: String,
pub code: Option<String>,
pub revert_code: Option<String>,
pub call: Option<FunctionCallsData>,
pub docs: Option<DocumentationUrlsData>,
pub recommend: Option<Recommend>,
}Expand description
ยงScript
- Script represents a single tweak.
- A script can be of two different types (just like functions):
- Inline script; a script with an inline code
- Must define
codeproperty and optionallyrevertCodebut notcall
- Must define
- Caller script; a script that calls other functions
- Must define
callproperty but notcodeorrevertCode
- Must define
- Inline script; a script with an inline code
- ๐ For any new script, please add
revertCodeanddocsvalues if possible.
Fieldsยง
ยงname: String- Name of the script
- โ Must be unique throughout the Collection
code: Option<String>- Batch file commands that will be executed
- ๐ก If defined, best practice to also define
revertCode - โ If not defined
callmust be defined, do not define ifcallis defined.
revert_code: Option<String>- Code thatโll undo the change done by
codeproperty. - E.g. letโs say
codesets an environment variable assetx POWERSHELL_TELEMETRY_OPTOUT 1- then
revertCodeshould be doingsetx POWERSHELL_TELEMETRY_OPTOUT 0
- then
- โ Do not define if
callis defined.
call: Option<FunctionCallsData>- A shared function or sequence of functions to call (called in order)
- โ If not defined
codemust be defined
docs: Option<DocumentationUrlsData>- Single documentation URL or list of URLs for those who wants to learn more about the script
- E.g.
https://docs.microsoft.com/en-us/windows-server/
recommend: Option<Recommend>- If not defined then the script will not be recommended
- If defined it can be either
standard: Only non-breaking scripts without limiting OS functionalitystrict: Scripts that can break certain functionality in favor of privacy and security
Trait Implementationsยง
Sourceยงimpl Debug for ScriptData
impl Debug for ScriptData
Sourceยงimpl<'de> Deserialize<'de> for ScriptData
impl<'de> Deserialize<'de> for ScriptData
Sourceยงfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementationsยง
impl Freeze for ScriptData
impl RefUnwindSafe for ScriptData
impl Send for ScriptData
impl Sync for ScriptData
impl Unpin for ScriptData
impl UnwindSafe for ScriptData
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