pub struct Parameters {
pub version: f32,
pub encryption: Option<ParameterEncryption>,
pub scenarios: Option<Vec<Scenario>>,
pub authorizations: Option<Vec<Authorization>>,
pub certificates: Option<Vec<Certificate>>,
pub proxies: Option<Vec<Proxy>>,
}Expand description
Stored parameters, authorization, client certificates and proxies stored outside of a workbook, either globally or alongside a workbook
Fields§
§version: f32Version of format (should not be changed manually)
encryption: Option<ParameterEncryption>Encryption
scenarios: Option<Vec<Scenario>>Scenarios
Authorizations
certificates: Option<Vec<Certificate>>Certificates
proxies: Option<Vec<Proxy>>Proxy servers
Implementations§
Source§impl Parameters
impl Parameters
pub fn new( scenarios: Option<Vec<Scenario>>, authorizations: Option<Vec<Authorization>>, certificates: Option<Vec<Certificate>>, proxies: Option<Vec<Proxy>>, ) -> Self
Sourcepub fn open(
file_name: &PathBuf,
create_new_if_missing: bool,
) -> Result<Parameters, ApicizeError>
pub fn open( file_name: &PathBuf, create_new_if_missing: bool, ) -> Result<Parameters, ApicizeError>
Open parameters from parameters file; or, if specified, create default if parameters file does not exist
Sourcepub fn save(
&self,
file_name: &PathBuf,
destination_name: &str,
password: &Option<String>,
) -> Result<SerializationSaveSuccess, ApicizeError>
pub fn save( &self, file_name: &PathBuf, destination_name: &str, password: &Option<String>, ) -> Result<SerializationSaveSuccess, ApicizeError>
Save parametesr to file if it contains entries, otherwise, delete it
pub fn get_parameter_count(&self) -> usize
Sourcepub fn get_globals_filename() -> PathBuf
pub fn get_globals_filename() -> PathBuf
Return the file name for globals
Sourcepub fn get_workbook_private_filename(workbook_path: &Path) -> PathBuf
pub fn get_workbook_private_filename(workbook_path: &Path) -> PathBuf
Return the file name for a workbook’s private parameters file
Sourcepub fn any_encyrypted(&self) -> bool
pub fn any_encyrypted(&self) -> bool
Return true if any paramerers are encrypted
Sourcepub fn encyrpt(
&mut self,
password: &str,
method: ParameterEncryption,
) -> Result<Parameters, ApicizeError>
pub fn encyrpt( &mut self, password: &str, method: ParameterEncryption, ) -> Result<Parameters, ApicizeError>
Encrypt any plain entries
Trait Implementations§
Source§impl Clone for Parameters
impl Clone for Parameters
Source§fn clone(&self) -> Parameters
fn clone(&self) -> Parameters
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for Parameters
impl Default for Parameters
Source§impl<'de> Deserialize<'de> for Parameters
impl<'de> Deserialize<'de> for Parameters
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
Source§impl PartialEq for Parameters
impl PartialEq for Parameters
Source§impl Serialize for Parameters
impl Serialize for Parameters
impl StructuralPartialEq for Parameters
Auto Trait Implementations§
impl Freeze for Parameters
impl RefUnwindSafe for Parameters
impl Send for Parameters
impl Sync for Parameters
impl Unpin for Parameters
impl UnsafeUnpin for Parameters
impl UnwindSafe for Parameters
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