pub struct SpecializationProjection { /* private fields */ }Expand description
Aggregate projection of a concrete signature.
§Examples
use tenferro_runtime::{InputSignature, SpecializationRequirements};
let projection = SpecializationRequirements::polymorphic(0)
.project(&InputSignature::new(Vec::new()))
?;
assert!(projection.inputs().is_empty());Implementations§
Source§impl SpecializationProjection
impl SpecializationProjection
Sourcepub fn requirements(&self) -> &SpecializationRequirements
pub fn requirements(&self) -> &SpecializationRequirements
Return the requirements that produced this projection.
§Examples
use tenferro_runtime::{InputSignature, SpecializationRequirements};
let requirements = SpecializationRequirements::polymorphic(0);
let projection = requirements.project(&InputSignature::new(Vec::new()))?;
assert_eq!(projection.requirements(), &requirements);Sourcepub fn inputs(&self) -> &[InputSpecializationProjection]
pub fn inputs(&self) -> &[InputSpecializationProjection]
Return per-input projections.
§Examples
use tenferro_runtime::{InputSignature, SpecializationRequirements};
let projection = SpecializationRequirements::polymorphic(0)
.project(&InputSignature::new(Vec::new()))
?;
assert!(projection.inputs().is_empty());Trait Implementations§
Source§impl Clone for SpecializationProjection
impl Clone for SpecializationProjection
Source§fn clone(&self) -> SpecializationProjection
fn clone(&self) -> SpecializationProjection
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 SpecializationProjection
impl Debug for SpecializationProjection
Source§impl Hash for SpecializationProjection
impl Hash for SpecializationProjection
Source§impl PartialEq for SpecializationProjection
impl PartialEq for SpecializationProjection
Source§fn eq(&self, other: &SpecializationProjection) -> bool
fn eq(&self, other: &SpecializationProjection) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for SpecializationProjection
impl StructuralPartialEq for SpecializationProjection
Auto Trait Implementations§
impl Freeze for SpecializationProjection
impl RefUnwindSafe for SpecializationProjection
impl Send for SpecializationProjection
impl Sync for SpecializationProjection
impl Unpin for SpecializationProjection
impl UnsafeUnpin for SpecializationProjection
impl UnwindSafe for SpecializationProjection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
Converts
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>
Converts
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