pub struct DUP {
pub name: String,
pub description: String,
pub version: String,
/* private fields */
}Expand description
Represents a Data Usage Policy (DUP)
Fields§
§name: StringThe common name of the Data Usage Policy, (e.g.: For Billing Purpose)
description: StringA textual description of the Data Usage Policy
version: StringThe version of the policy, (e.g.: 1.0.0)
Implementations§
Source§impl DUP
impl DUP
Sourcepub fn new(nme: String, descr: String, ver: String) -> Self
pub fn new(nme: String, descr: String, ver: String) -> Self
Constructs a new Data Usage Policy object
§Arguments
- nme: String - The textual name of the Data Usage Policy.
- descr: String - A textual description of the Data Usage Policy.
- ver: String - The version of the policy, (e.g.: 1.0.0).
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
fn main() {
let dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
}Sourcepub fn associate_category(&mut self, category: DataCategory)
pub fn associate_category(&mut self, category: DataCategory)
Associates a DataCategory object to the policy NOTE: Call this function to associate a new DataCategory objects or replace pre-associated DataCategory objects
§Arguments
- category: DataCategory - The Data Category to associate.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_category::DataCategory;
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
dup.associate_category(DataCategory::new(
"Authentication Data".to_string(),
"Data used to manage access to the system.".to_string(),
"system.authentication".to_string(),
"default_organization".to_string(),
Some("system".to_string()),
None,
false,
true,
));
}Sourcepub fn associate_subject(&mut self, subject: DataSubject)
pub fn associate_subject(&mut self, subject: DataSubject)
Associates a DataSubject object to the policy NOTE: Call this function to associate a new DataSubject objects or replace pre-associated DataSubject objects
§Arguments
- subject: DataSubject - The Data Subject to associate.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_subject::{DataRights, DataSubject, Right, Strategy};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let subject = DataSubject::new(
"Consultant".to_string(),
"An individual employed in a consultative/temporary capacity by the organization.".to_string(),
"consultant".to_string(),
"default_organization".to_string(),
Some(vec!["work".to_string(), "temporary".to_string()]),
Some(DataRights::new(Strategy::ALL, vec![Right::Informed, Right::Access])),
false,
false,
true
);
dup.associate_subject(subject);
}Sourcepub fn associate_use(&mut self, usage: DataUse)
pub fn associate_use(&mut self, usage: DataUse)
Associates a DataUse object to the policy NOTE: Call this function to associate a new DataUse objects or replace pre-associated DataUse objects
§Arguments
- usage: DataUse - The Data Use to associate.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_use::{DataUse, LegalBasis, SpecialCategory};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let datause = DataUse::new(
"Provide the capability".to_string(),
"Provide, give, or make available the product, service, application or system.".to_string(),
"provide".to_string(),
"default_organization".to_string(),
None,
Some(LegalBasis::LegitimateInterest),
Some(SpecialCategory::VitalInterests),
Some(vec!("marketing team".to_string(), "dog shelter".to_string())),
false,
Some("https://example.org/legitimate_interest_assessment".to_string()),
None,
false,
true
);
dup.associate_use(datause);
}Sourcepub fn as_html(&mut self) -> String
pub fn as_html(&mut self) -> String
Converts the policy to a human readable format as html
NOTE: You can apply custom styling by referencing the class attribute of the elements.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_category::DataCategoryFactory;
use pbd::dua::data_subject::DataSubjectFactory;
use pbd::dua::data_use::DataUseFactory;
fn main() {
let cfactory = DataCategoryFactory::new();
let sfactory = DataSubjectFactory::new();
let ufactory = DataUseFactory::new();
let mut dup = DUP::new(
"General Marketing Policy".to_string(),
"This policy explains the manner in which your data will be used for marketing purposes.".to_string(),
"1.0.0".to_string()
);
dup.associate_category(
cfactory
.get_category_by_key("user.behavior.browsing_history".to_string())
.unwrap(),
);
dup.associate_category(
cfactory
.get_category_by_key("user.behavior.media_consumption".to_string())
.unwrap(),
);
dup.associate_subject(sfactory.get_subject_by_key("customer".to_string()).unwrap());
dup.associate_subject(sfactory.get_subject_by_key("prospect".to_string()).unwrap());
dup.associate_use(
ufactory
.get_use_by_key("marketing.advertising.profiling".to_string())
.unwrap(),
);
dup.associate_use(
ufactory
.get_use_by_key("marketing.advertising.serving".to_string())
.unwrap(),
);
dup.associate_use(
ufactory
.get_use_by_key("marketing.communications.email".to_string())
.unwrap(),
);
print!("{}", dup.as_html());
/* <div class='dup' name='General Policy'>General Policy</div></br>
* <div class='dup-verion' name='1.0.1'>(version: 1.0.1)</div></br></br>
* <div class='dup-description' name='General Policy Description'><b>This is a high-level policy.</b></br></br>
* <p>
* Data will be collected from the following types of users: Customer and Prospect.</br>
* The data being collected will be limited to the following data: Browsing History and Media Consumption.</br>
* The data collected can be used for the following purposes: Profiling for Advertising, Essential for Serving Ads and Marketing Email Communications.</br>
* </p></div>
*/
}Sourcepub fn as_text(&mut self) -> String
pub fn as_text(&mut self) -> String
Converts the policy to a human readable format as text
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_category::DataCategoryFactory;
use pbd::dua::data_subject::DataSubjectFactory;
use pbd::dua::data_use::DataUseFactory;
fn main() {
let cfactory = DataCategoryFactory::new();
let sfactory = DataSubjectFactory::new();
let ufactory = DataUseFactory::new();
let mut dup = DUP::new(
"General Marketing Policy".to_string(),
"This policy explains the manner in which your data will be used for marketing purposes.".to_string(),
"1.0.0".to_string()
);
dup.associate_category(
cfactory
.get_category_by_key("user.behavior.browsing_history".to_string())
.unwrap(),
);
dup.associate_category(
cfactory
.get_category_by_key("user.behavior.media_consumption".to_string())
.unwrap(),
);
dup.associate_subject(sfactory.get_subject_by_key("customer".to_string()).unwrap());
dup.associate_subject(sfactory.get_subject_by_key("prospect".to_string()).unwrap());
dup.associate_use(
ufactory
.get_use_by_key("marketing.advertising.profiling".to_string())
.unwrap(),
);
dup.associate_use(
ufactory
.get_use_by_key("marketing.advertising.serving".to_string())
.unwrap(),
);
dup.associate_use(
ufactory
.get_use_by_key("marketing.communications.email".to_string())
.unwrap(),
);
print!("{}", dup.as_text());
/* General Marketing Policy
* (version: 1.0.0)
*
* This policy explains the manner in which your data will be used for marketing purposes.
*
* Data will be collected from the following types of users: Customer and Prospect.
* The data being collected will be limited to the following data: Browsing History and Media Consumption.
* The data collected can be used for the following purposes: Profiling for Advertising, Essential for Serving Ads and Marketing Email Communications.
*/
}Sourcepub fn disassociate_category(&mut self, key: String)
pub fn disassociate_category(&mut self, key: String)
Disassociates the specified DataCategory object from the policy using the key
§Arguments
- key: String - The key of the Data Category to disassociate.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_category::DataCategory;
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let cat = DataCategory::new(
"Authentication Data".to_string(),
"Data used to manage access to the system.".to_string(),
"system.authentication".to_string(),
"default_organization".to_string(),
Some("system".to_string()),
None,
false,
true,
);
dup.associate_category(cat.clone());
dup.disassociate_category(cat.get_key());
}Sourcepub fn disassociate_subject(&mut self, key: String)
pub fn disassociate_subject(&mut self, key: String)
Disassociates the specified DataSubject object from the policy using the key
§Arguments
- key: String - The key of the Data Subject to disassociate.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_subject::{DataRights, DataSubject, Right, Strategy};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let subject = DataSubject::new(
"Consultant".to_string(),
"An individual employed in a consultative/temporary capacity by the organization.".to_string(),
"consultant".to_string(),
"default_organization".to_string(),
Some(vec!["work".to_string(), "temporary".to_string()]),
Some(DataRights::new(Strategy::ALL, vec![Right::Informed, Right::Access])),
false,
false,
true
);
dup.associate_subject(subject.clone());
dup.disassociate_subject(subject.get_key());
}Sourcepub fn disassociate_use(&mut self, key: String)
pub fn disassociate_use(&mut self, key: String)
Disassociates the specified DataUse object from the policy using the key
§Arguments
- key: String - The key of the Data Use to disassociate.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_use::{DataUse, LegalBasis, SpecialCategory};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let datause = DataUse::new(
"Provide the capability".to_string(),
"Provide, give, or make available the product, service, application or system.".to_string(),
"provide".to_string(),
"default_organization".to_string(),
None,
Some(LegalBasis::LegitimateInterest),
Some(SpecialCategory::VitalInterests),
Some(vec!("marketing team".to_string(), "dog shelter".to_string())),
false,
Some("https://example.org/legitimate_interest_assessment".to_string()),
None,
false,
true
);
dup.associate_use(datause.clone());
dup.disassociate_use(datause.get_key());
}Sourcepub fn from_serialized(serialized: &str) -> DUP
pub fn from_serialized(serialized: &str) -> DUP
Constructs a DUP object from a serialized string
§Arguments
- serialized: &str - The string that represents the serialized object.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
fn main() {
let serialized = r#"{"name":"General Policy","description":"This is a high-level policy.","version":"1.0.1","categories":{"system.authentication":{"name":"Authentication Data","description":"Data used to manage access to the system.","fides_key":"system.authentication","organization_fides_key":"default_organization","parent_key":"system","tags":null,"is_default":true,"active":true}},"subjects":{"consultant":{"name":"Consultant","description":"An individual employed in a consultative/temporary capacity by the organization.","fides_key":"consultant","organization_fides_key":"default_organization","tags":null,"rights":null,"automated_decisions_or_profiling":false,"is_default":true,"active":true}},"uses":{"essential.service.authentication":{"name":"Essential Service Authentication","description":"Authenticate users to the product, service, application or system.","fides_key":"essential.service.authentication","organization_fides_key":"default_organization","parent_key":"essential.service","legal_basis":null,"special_category":null,"recipent":null,"legitimate_interest":false,"legitimate_interest_impact_assessment":null,"tags":null,"is_default":true,"active":true}}}"#;
let mut dup = DUP::from_serialized(&serialized);
assert_eq!(dup.get_categories().len(), 1);
}Sourcepub fn get_categories(&mut self) -> Vec<DataCategory>
pub fn get_categories(&mut self) -> Vec<DataCategory>
Retrieves all the associated DataCategory objects
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_category::DataCategory;
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
dup.associate_category(DataCategory::new(
"Authentication Data".to_string(),
"Data used to manage access to the system.".to_string(),
"system.authentication".to_string(),
"default_organization".to_string(),
Some("system".to_string()),
None,
false,
true,
));
assert_eq!(dup.get_categories().len(), 1);
}Sourcepub fn get_subjects(&mut self) -> Vec<DataSubject>
pub fn get_subjects(&mut self) -> Vec<DataSubject>
Retrieves all the associated DataSubject objects
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_subject::{DataRights, DataSubject, Right, Strategy};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let subject = DataSubject::new(
"Consultant".to_string(),
"An individual employed in a consultative/temporary capacity by the organization.".to_string(),
"consultant".to_string(),
"default_organization".to_string(),
Some(vec!["work".to_string(), "temporary".to_string()]),
Some(DataRights::new(Strategy::ALL, vec![Right::Informed, Right::Access])),
false,
false,
true
);
dup.associate_subject(subject);
assert_eq!(dup.get_subjects().len(), 1);
}Sourcepub fn get_uses(&mut self) -> Vec<DataUse>
pub fn get_uses(&mut self) -> Vec<DataUse>
Retrieves all the associated DataUse objects
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_use::{DataUse, LegalBasis, SpecialCategory};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let datause = DataUse::new(
"Provide the capability".to_string(),
"Provide, give, or make available the product, service, application or system.".to_string(),
"provide".to_string(),
"default_organization".to_string(),
None,
Some(LegalBasis::LegitimateInterest),
Some(SpecialCategory::VitalInterests),
Some(vec!("marketing team".to_string(), "dog shelter".to_string())),
false,
Some("https://example.org/legitimate_interest_assessment".to_string()),
None,
false,
true
);
dup.associate_use(datause);
assert_eq!(dup.get_uses().len(), 1);
}Sourcepub fn get_category(&mut self, key: String) -> Option<&DataCategory>
pub fn get_category(&mut self, key: String) -> Option<&DataCategory>
Retrieves a reference to the specified DataCategory that is associated with the policy
§Arguments
- key: String - The key of the Data Category to retrieve.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_category::DataCategory;
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let cat = DataCategory::new(
"Authentication Data".to_string(),
"Data used to manage access to the system.".to_string(),
"system.authentication".to_string(),
"default_organization".to_string(),
Some("system".to_string()),
None,
false,
true,
);
dup.associate_category(cat.clone());
let retrieved_category = dup.get_category(cat.get_key()).unwrap();
println!("{}", retrieved_category.description);
}Sourcepub fn get_subject(&mut self, key: String) -> Option<&DataSubject>
pub fn get_subject(&mut self, key: String) -> Option<&DataSubject>
Retrieves a reference to the specified DataSubject that is associated with the policy
§Arguments
- key: String - The key of the Data Subject to retrieve.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_subject::{DataRights, DataSubject, Right, Strategy};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let subject = DataSubject::new(
"Consultant".to_string(),
"An individual employed in a consultative/temporary capacity by the organization.".to_string(),
"consultant".to_string(),
"default_organization".to_string(),
Some(vec!["work".to_string(), "temporary".to_string()]),
Some(DataRights::new(Strategy::ALL, vec![Right::Informed, Right::Access])),
false,
false,
true
);
dup.associate_subject(subject.clone());
let retrieved_subject = dup.get_subject(subject.get_key()).unwrap();
println!("{}", retrieved_subject.description);
}Sourcepub fn get_use(&mut self, key: String) -> Option<&DataUse>
pub fn get_use(&mut self, key: String) -> Option<&DataUse>
Retrieves a reference to the specified DataUse that is associated with the policy
§Arguments
- key: String - The key of the Data Use to retrieve.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_use::{DataUse, LegalBasis, SpecialCategory};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let datause = DataUse::new(
"Provide the capability".to_string(),
"Provide, give, or make available the product, service, application or system.".to_string(),
"provide".to_string(),
"default_organization".to_string(),
None,
Some(LegalBasis::LegitimateInterest),
Some(SpecialCategory::VitalInterests),
Some(vec!("marketing team".to_string(), "dog shelter".to_string())),
false,
Some("https://example.org/legitimate_interest_assessment".to_string()),
None,
false,
true
);
dup.associate_use(datause.clone());
let retrieved_use = dup.get_use(datause.get_key()).unwrap();
println!("{}", retrieved_use.description);
}Sourcepub fn has_category(&mut self, key: String) -> bool
pub fn has_category(&mut self, key: String) -> bool
Determines if the specified DataCategory key is associated with the policy
§Arguments
- key: String - The key of the Data Category to check.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_category::DataCategory;
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let cat = DataCategory::new(
"Authentication Data".to_string(),
"Data used to manage access to the system.".to_string(),
"system.authentication".to_string(),
"default_organization".to_string(),
Some("system".to_string()),
None,
false,
true,
);
dup.associate_category(cat.clone());
assert_eq!(dup.has_category(cat.get_key()), true);
}Sourcepub fn has_subject(&mut self, key: String) -> bool
pub fn has_subject(&mut self, key: String) -> bool
Determines if the specified DataSubejct key is associated with the policy
§Arguments
- key: String - The key of the Data Subject to check.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_subject::{DataRights, DataSubject, Right, Strategy};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let subject = DataSubject::new(
"Consultant".to_string(),
"An individual employed in a consultative/temporary capacity by the organization.".to_string(),
"consultant".to_string(),
"default_organization".to_string(),
Some(vec!["work".to_string(), "temporary".to_string()]),
Some(DataRights::new(Strategy::ALL, vec![Right::Informed, Right::Access])),
false,
false,
true
);
dup.associate_subject(subject.clone());
assert_eq!(dup.has_subject(subject.get_key()), true);
}Sourcepub fn has_use(&mut self, key: String) -> bool
pub fn has_use(&mut self, key: String) -> bool
Determines if the specified DataUse key is associated with the policy
§Arguments
- key: String - The key of the Data Use to check.
#Example
extern crate pbd;
use pbd::dua::policy::DUP;
use pbd::dua::data_use::{DataUse, LegalBasis, SpecialCategory};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let datause = DataUse::new(
"Provide the capability".to_string(),
"Provide, give, or make available the product, service, application or system.".to_string(),
"provide".to_string(),
"default_organization".to_string(),
None,
Some(LegalBasis::LegitimateInterest),
Some(SpecialCategory::VitalInterests),
Some(vec!("marketing team".to_string(), "dog shelter".to_string())),
false,
Some("https://example.org/legitimate_interest_assessment".to_string()),
None,
false,
true
);
dup.associate_use(datause.clone());
assert_eq!(dup.has_use(datause.get_key()), true);
}Sourcepub fn match_conditions(&mut self, conditions: Vec<Condition>) -> Vec<Condition>
pub fn match_conditions(&mut self, conditions: Vec<Condition>) -> Vec<Condition>
Determines if the specified Conditions can be met by the policy and returns a list of conditions that conflict wiht the policy.
§Arguments
- conditions: Vec
- The list of Conditions to check against the policy.
#Example
extern crate pbd;
use pbd::dua::policy::{Condition, DUP};
use pbd::dua::data_category::DataCategory;
use pbd::dua::data_subject::{DataRights, DataSubject, Right, Strategy};
use pbd::dua::data_use::{DataUse, LegalBasis, SpecialCategory};
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let category = DataCategory::new(
"Authentication Data".to_string(),
"Data used to manage access to the system.".to_string(),
"system.authentication".to_string(),
"default_organization".to_string(),
Some("system".to_string()),
None,
false,
true,
);
let subject = DataSubject::new(
"Consultant".to_string(),
"An individual employed in a consultative/temporary capacity by the organization.".to_string(),
"consultant".to_string(),
"default_organization".to_string(),
Some(vec!["work".to_string(), "temporary".to_string()]),
Some(DataRights::new(Strategy::ALL, vec![Right::Informed, Right::Access])),
false,
false,
true
);
let datause = DataUse::new(
"Provide the capability".to_string(),
"Provide, give, or make available the product, service, application or system.".to_string(),
"provide".to_string(),
"default_organization".to_string(),
None,
Some(LegalBasis::LegitimateInterest),
Some(SpecialCategory::VitalInterests),
Some(vec!("marketing team".to_string(), "dog shelter".to_string())),
false,
Some("https://example.org/legitimate_interest_assessment".to_string()),
None,
false,
true
);
dup.associate_category(category.clone());
dup.associate_use(datause.clone());
let mut conditions: Vec<Condition> = Vec::new();
conditions.push(Condition::Category(category.get_key()));
conditions.push(Condition::Subject(subject.get_key()));
conditions.push(Condition::Use(datause.get_key()));
let conflicts = dup.match_conditions(conditions);
assert_eq!(conflicts.len(), 1);
assert_eq!(conflicts[0].to_string(), subject.get_key());
}Sourcepub fn serialize(&mut self) -> String
pub fn serialize(&mut self) -> String
Serialize a DUP object
§Arguments
- serialized: &str - The string that represents the serialized object.
#Example
extern crate pbd;
use pbd::dua::policy::{Condition, DUP};
use pbd::dua::data_category::DataCategoryFactory;
use pbd::dua::data_subject::DataSubjectFactory;
use pbd::dua::data_use::DataUseFactory;
fn main() {
let mut dup = DUP::new(
"General Policy".to_string(),
"This is a high-level policy.".to_string(),
"1.0.1".to_string()
);
let category_factory = DataCategoryFactory::new();
let subject_factory = DataSubjectFactory::new();
let use_factory = DataUseFactory::new();
dup.associate_category(category_factory.get_category_by_key("system.authentication".to_string()).unwrap());
dup.associate_subject(subject_factory.get_subject_by_key("consultant".to_string()).unwrap());
dup.associate_use(use_factory.get_use_by_key("analytics.reporting".to_string()).unwrap());
println!("{:?}", dup.serialize());
}Trait Implementations§
Source§impl<'de> Deserialize<'de> for DUP
impl<'de> Deserialize<'de> for DUP
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>,
Auto Trait Implementations§
impl Freeze for DUP
impl RefUnwindSafe for DUP
impl Send for DUP
impl Sync for DUP
impl Unpin for DUP
impl UnwindSafe for DUP
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more