pub struct OwnedRegistrationRule {
pub required_preset: Option<String>,
pub required_parts: Vec<String>,
pub required_exports: Vec<String>,
pub required_handle_traits: Vec<String>,
pub required_part_traits: Vec<String>,
}Expand description
Owned twin of RegistrationRule, the structural entry rule.
RegistrationRule 的 owned 孪生:注册面的结构入门规范。
Fields§
§required_preset: Option<String>Preset name the face must declare, when one is required. 注册面必须声明的 preset 名称(若有要求)。
required_parts: Vec<String>Structural parts the face must provide. 注册面必须提供的结构 parts。
required_exports: Vec<String>Export names the face must declare. 注册面必须声明的导出名称。
required_handle_traits: Vec<String>Interfaces the handle type must implement, for example ControlHandle.
handle 类型必须实现的接口,例如 ControlHandle。
required_part_traits: Vec<String>Interfaces the parts type must implement, for example ActionParts.
parts 类型必须实现的接口,例如 ActionParts。
Implementations§
Source§impl OwnedRegistrationRule
impl OwnedRegistrationRule
Sourcepub fn validate(&self, snapshot: &RegistrationSnapshot) -> Vec<String>
pub fn validate(&self, snapshot: &RegistrationSnapshot) -> Vec<String>
Validate all structural requirements and return every failure. 校验全部结构要求,并一次返回所有失败项。
Trait Implementations§
Source§impl Clone for OwnedRegistrationRule
impl Clone for OwnedRegistrationRule
Source§fn clone(&self) -> OwnedRegistrationRule
fn clone(&self) -> OwnedRegistrationRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OwnedRegistrationRule
impl Debug for OwnedRegistrationRule
impl Eq for OwnedRegistrationRule
Source§impl PartialEq for OwnedRegistrationRule
impl PartialEq for OwnedRegistrationRule
impl StructuralPartialEq for OwnedRegistrationRule
Auto Trait Implementations§
impl Freeze for OwnedRegistrationRule
impl RefUnwindSafe for OwnedRegistrationRule
impl Send for OwnedRegistrationRule
impl Sync for OwnedRegistrationRule
impl Unpin for OwnedRegistrationRule
impl UnsafeUnpin for OwnedRegistrationRule
impl UnwindSafe for OwnedRegistrationRule
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