pub struct CapabilityMeta {
pub name: String,
pub kind: CapabilityKind,
pub arity: usize,
pub receiver: Option<TypeClass>,
pub args: Vec<TypeClass>,
pub result: TypeClass,
pub phases: BTreeSet<Phase>,
pub body_access: BodyAccess,
pub regex_args: Vec<RegexArgMeta>,
pub deterministic: bool,
pub side_effect_free: bool,
pub cost: CostModel,
}Fields§
§name: String§kind: CapabilityKind§arity: usize§receiver: Option<TypeClass>§args: Vec<TypeClass>§result: TypeClass§phases: BTreeSet<Phase>§body_access: BodyAccess§regex_args: Vec<RegexArgMeta>§deterministic: bool§side_effect_free: bool§cost: CostModelImplementations§
Source§impl CapabilityMeta
impl CapabilityMeta
pub fn function(name: impl Into<String>, arity: usize) -> Self
pub fn method(name: impl Into<String>, arity: usize) -> Self
pub fn unary_operator(op: UnaryOp) -> Self
pub fn binary_operator(op: BinaryOp) -> Self
pub fn with_phases(self, phases: impl IntoIterator<Item = Phase>) -> Self
pub fn with_receiver(self, receiver: TypeClass) -> Self
pub fn with_args(self, args: impl IntoIterator<Item = TypeClass>) -> Self
pub fn with_result(self, result: TypeClass) -> Self
pub fn with_body_access(self, access: BodyAccess) -> Self
pub fn with_regex_arg(self, index: usize, flavor: RegexFlavor) -> Self
pub fn with_cost(self, cost: CostModel) -> Self
pub fn with_deterministic(self, deterministic: bool) -> Self
pub fn with_side_effect_free(self, side_effect_free: bool) -> Self
pub fn is_available_in(&self, phase: Phase) -> bool
pub fn ticket(&self) -> CapabilityTicket
Trait Implementations§
Source§impl Clone for CapabilityMeta
impl Clone for CapabilityMeta
Source§fn clone(&self) -> CapabilityMeta
fn clone(&self) -> CapabilityMeta
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 CapabilityMeta
impl Debug for CapabilityMeta
Source§impl<'de> Deserialize<'de> for CapabilityMeta
impl<'de> Deserialize<'de> for CapabilityMeta
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
impl Eq for CapabilityMeta
Source§impl PartialEq for CapabilityMeta
impl PartialEq for CapabilityMeta
Source§impl Serialize for CapabilityMeta
impl Serialize for CapabilityMeta
impl StructuralPartialEq for CapabilityMeta
Auto Trait Implementations§
impl Freeze for CapabilityMeta
impl RefUnwindSafe for CapabilityMeta
impl Send for CapabilityMeta
impl Sync for CapabilityMeta
impl Unpin for CapabilityMeta
impl UnsafeUnpin for CapabilityMeta
impl UnwindSafe for CapabilityMeta
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