pub struct TypeMatcher<'a> { /* private fields */ }Expand description
Facade over is_assignable that translates a TypeConsistencyEnforcement
policy into the internal AssignabilityConfig.
No own state — passes the TCE values through at call time.
Implementations§
Source§impl<'a> TypeMatcher<'a>
impl<'a> TypeMatcher<'a>
Sourcepub const fn new(tce: &'a TypeConsistencyEnforcement) -> Self
pub const fn new(tce: &'a TypeConsistencyEnforcement) -> Self
Constructor with a TCE policy.
Sourcepub fn match_types(
&self,
writer: &TypeIdentifier,
reader: &TypeIdentifier,
registry: &TypeRegistry,
) -> TypeMatchResult
pub fn match_types( &self, writer: &TypeIdentifier, reader: &TypeIdentifier, registry: &TypeRegistry, ) -> TypeMatchResult
Checks writer↔reader type compatibility.
registry provides TypeObjects for EquivalenceHash references;
an empty registry fits primitive/plain types.
Trait Implementations§
Source§impl<'a> Clone for TypeMatcher<'a>
impl<'a> Clone for TypeMatcher<'a>
Source§fn clone(&self) -> TypeMatcher<'a>
fn clone(&self) -> TypeMatcher<'a>
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 moreimpl<'a> Copy for TypeMatcher<'a>
Auto Trait Implementations§
impl<'a> Freeze for TypeMatcher<'a>
impl<'a> RefUnwindSafe for TypeMatcher<'a>
impl<'a> Send for TypeMatcher<'a>
impl<'a> Sync for TypeMatcher<'a>
impl<'a> Unpin for TypeMatcher<'a>
impl<'a> UnsafeUnpin for TypeMatcher<'a>
impl<'a> UnwindSafe for TypeMatcher<'a>
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