Struct sdml_core::model::constraints::FunctionComposition
source · pub struct FunctionComposition { /* private fields */ }
Expand description
Corresponds to the grammar rule function_composition
.
§Well-Formedness Rules
- The list of function names MUST have at least one element.
$$\forall r \in FunctionComposition \left( |name(r)| \gte 1 \right)$$
§Semantics
The keyword self
may ONLY appear as the first element.
The name path $x.y.z$ is equivalent to $z(y(x))$, or $(z \circ y)(x)$.
For example:
self.name.length
becomes length(name(self))
Implementations§
source§impl FunctionComposition
impl FunctionComposition
pub fn new<S, N>(subject: S, function_names: N) -> Self
pub fn subject(&self) -> &Subject
pub fn set_subject<S>(&mut self, subject: S)
pub fn has_function_names(&self) -> bool
pub fn function_names_len(&self) -> usize
pub fn function_names(&self) -> impl Iterator<Item = &Identifier>
pub fn function_names_mut(&mut self) -> impl Iterator<Item = &mut Identifier>
pub fn add_to_function_names<I>(&mut self, value: I)where
I: Into<Identifier>,
pub fn extend_function_names<I>(&mut self, extension: I)where
I: IntoIterator<Item = Identifier>,
Trait Implementations§
source§impl Clone for FunctionComposition
impl Clone for FunctionComposition
source§fn clone(&self) -> FunctionComposition
fn clone(&self) -> FunctionComposition
Returns a copy 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 Debug for FunctionComposition
impl Debug for FunctionComposition
source§impl<'de> Deserialize<'de> for FunctionComposition
impl<'de> Deserialize<'de> for FunctionComposition
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 From<FunctionComposition> for Term
impl From<FunctionComposition> for Term
source§fn from(v: FunctionComposition) -> Self
fn from(v: FunctionComposition) -> Self
Converts to this type from the input type.
source§impl HasSourceSpan for FunctionComposition
impl HasSourceSpan for FunctionComposition
fn with_source_span(self, span: Span) -> Self
fn source_span(&self) -> Option<&Span>
fn set_source_span(&mut self, span: Span)
fn unset_source_span(&mut self)
fn has_source_span(&self) -> bool
Auto Trait Implementations§
impl RefUnwindSafe for FunctionComposition
impl Send for FunctionComposition
impl Sync for FunctionComposition
impl Unpin for FunctionComposition
impl UnwindSafe for FunctionComposition
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