pub struct TypeWithCtx<'a>(/* private fields */);Expand description
A type wrapped with its typing context
Implementations§
Source§impl TypeWithCtx<'_>
impl TypeWithCtx<'_>
Sourcepub fn expect_op(&self, op: BinOp) -> Result<(), InvalidOp>
pub fn expect_op(&self, op: BinOp) -> Result<(), InvalidOp>
Expect a type compatible with this binary operator
Sourcepub fn expect_relvar(&self) -> Result<RelType<'_>, ExpectedRelvar>
pub fn expect_relvar(&self) -> Result<RelType<'_>, ExpectedRelvar>
Expect a relvar or base relation type
Sourcepub fn expect_scalar(&self) -> Result<&AlgebraicType, ExpectedScalar>
pub fn expect_scalar(&self) -> Result<&AlgebraicType, ExpectedScalar>
Expect a scalar or column type, not a relation type
Sourcepub fn expect_relation(&self) -> Result<RelType<'_>, ExpectedRelation>
pub fn expect_relation(&self) -> Result<RelType<'_>, ExpectedRelation>
Expect a relation, not a scalar or column type
Methods from Deref<Target = Type>§
pub const BOOL: Self = _
pub const I8: Self = _
pub const U8: Self = _
pub const I16: Self = _
pub const U16: Self = _
pub const I32: Self = _
pub const U32: Self = _
pub const I64: Self = _
pub const U64: Self = _
pub const I128: Self = _
pub const U128: Self = _
pub const I256: Self = _
pub const U256: Self = _
pub const F32: Self = _
pub const F64: Self = _
pub const STR: Self = _
Sourcepub fn is_compatible_with(&self, op: BinOp) -> bool
pub fn is_compatible_with(&self, op: BinOp) -> bool
Is this type compatible with this binary operator?
Trait Implementations§
Source§impl<'a> Debug for TypeWithCtx<'a>
impl<'a> Debug for TypeWithCtx<'a>
Source§impl Deref for TypeWithCtx<'_>
impl Deref for TypeWithCtx<'_>
Auto Trait Implementations§
impl<'a> Freeze for TypeWithCtx<'a>
impl<'a> RefUnwindSafe for TypeWithCtx<'a>
impl<'a> Send for TypeWithCtx<'a>
impl<'a> Sync for TypeWithCtx<'a>
impl<'a> Unpin for TypeWithCtx<'a>
impl<'a> UnwindSafe for TypeWithCtx<'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
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