pub trait CapabilityClause:
Clone
+ PartialEq
+ Debug {
Show 26 methods
// Required methods
fn service(&self) -> Option<OneOrMany<&Name>>;
fn protocol(&self) -> Option<OneOrMany<&Name>>;
fn directory(&self) -> Option<OneOrMany<&Name>>;
fn storage(&self) -> Option<OneOrMany<&Name>>;
fn runner(&self) -> Option<OneOrMany<&Name>>;
fn resolver(&self) -> Option<OneOrMany<&Name>>;
fn event_stream(&self) -> Option<OneOrMany<&Name>>;
fn dictionary(&self) -> Option<OneOrMany<&Name>>;
fn config(&self) -> Option<OneOrMany<&Name>>;
fn set_service(&mut self, o: Option<OneOrMany<Name>>);
fn set_protocol(&mut self, o: Option<OneOrMany<Name>>);
fn set_directory(&mut self, o: Option<OneOrMany<Name>>);
fn set_storage(&mut self, o: Option<OneOrMany<Name>>);
fn set_runner(&mut self, o: Option<OneOrMany<Name>>);
fn set_resolver(&mut self, o: Option<OneOrMany<Name>>);
fn set_event_stream(&mut self, o: Option<OneOrMany<Name>>);
fn set_dictionary(&mut self, o: Option<OneOrMany<Name>>);
fn set_config(&mut self, o: Option<OneOrMany<Name>>);
fn availability(&self) -> Option<Availability>;
fn set_availability(&mut self, a: Option<Availability>);
fn are_many_names_allowed(&self) -> bool;
fn decl_type(&self) -> &'static str;
fn supported(&self) -> &[&'static str];
// Provided methods
fn capability_type(&self) -> Result<&'static str, Error> { ... }
fn names(&self) -> Vec<&Name> { ... }
fn set_names(&mut self, names: Vec<Name>) { ... }
}
Required Methods§
fn service(&self) -> Option<OneOrMany<&Name>>
fn protocol(&self) -> Option<OneOrMany<&Name>>
fn directory(&self) -> Option<OneOrMany<&Name>>
fn storage(&self) -> Option<OneOrMany<&Name>>
fn runner(&self) -> Option<OneOrMany<&Name>>
fn resolver(&self) -> Option<OneOrMany<&Name>>
fn event_stream(&self) -> Option<OneOrMany<&Name>>
fn dictionary(&self) -> Option<OneOrMany<&Name>>
fn config(&self) -> Option<OneOrMany<&Name>>
fn set_service(&mut self, o: Option<OneOrMany<Name>>)
fn set_protocol(&mut self, o: Option<OneOrMany<Name>>)
fn set_directory(&mut self, o: Option<OneOrMany<Name>>)
fn set_storage(&mut self, o: Option<OneOrMany<Name>>)
fn set_runner(&mut self, o: Option<OneOrMany<Name>>)
fn set_resolver(&mut self, o: Option<OneOrMany<Name>>)
fn set_event_stream(&mut self, o: Option<OneOrMany<Name>>)
fn set_dictionary(&mut self, o: Option<OneOrMany<Name>>)
fn set_config(&mut self, o: Option<OneOrMany<Name>>)
fn availability(&self) -> Option<Availability>
fn set_availability(&mut self, a: Option<Availability>)
Sourcefn are_many_names_allowed(&self) -> bool
fn are_many_names_allowed(&self) -> bool
Returns true if this capability type allows the ::Many variant of OneOrMany.
fn decl_type(&self) -> &'static str
fn supported(&self) -> &[&'static str]
Provided Methods§
Sourcefn capability_type(&self) -> Result<&'static str, Error>
fn capability_type(&self) -> Result<&'static str, Error>
Returns the name of the capability for display purposes.
If service()
returns Some
, the capability name must be “service”, etc.
Returns an error if the capability name is not set, or if there is more than one.
Sourcefn names(&self) -> Vec<&Name>
fn names(&self) -> Vec<&Name>
Returns the names of the capabilities in this clause.
If protocol()
returns Some(OneOrMany::Many(vec!["a", "b"]))
, this returns![“a”, “b”].
fn set_names(&mut self, names: Vec<Name>)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.