pub struct ObjectT(/* private fields */);Implementations§
Trait Implementations§
Source§impl MersType for ObjectT
impl MersType for ObjectT
fn display(&self, info: &DisplayInfo<'_>, f: &mut Formatter<'_>) -> Result
Source§fn is_same_type_as(&self, other: &dyn MersType) -> bool
fn is_same_type_as(&self, other: &dyn MersType) -> bool
If self and other are different types (
other.as_any().downcast_ref::<Self>().is_none()),
this must return false.Source§fn is_included_in(&self, target: &dyn MersType) -> bool
fn is_included_in(&self, target: &dyn MersType) -> bool
This doesn’t handle the case where target is Type (Type::is_included_in handles it)
Source§fn without(&self, remove: &dyn MersType) -> Option<Type>
fn without(&self, remove: &dyn MersType) -> Option<Type>
Returns
self with remove removed, if it is different from self.
This must, at least, return Some(Type::empty()) if self.is_included_in(remove).
For example, (Int<1..9>).remove(Int<4..6>) would return Some(Int<1..3>/Int<7..9>).fn as_any(&self) -> &dyn Any
fn mut_any(&mut self) -> &mut dyn Any
fn to_any(self) -> Box<dyn Any>
Source§fn simplify_for_display(&self, info: &CheckInfo) -> Option<Type>
fn simplify_for_display(&self, info: &CheckInfo) -> Option<Type>
may mutate
self to simplify itfn executable(&self) -> Option<FunctionT>
Source§fn iterable(&self) -> Option<Type>
fn iterable(&self) -> Option<Type>
If Some(T), calling
iterable on the MersData this MersType belongs to
Should return Some(I), where I is an Iterator which only returns items of type T.Source§fn get(&self) -> Option<Type>
fn get(&self) -> Option<Type>
If Some(T), calling
get on data of this type may return T, but it might also return None.
By default, this returns the same thing as iterable, since this is also the default implementation for MersData::get.fn is_reference_to(&self) -> Option<&Type>
fn simplified_as_string(&self, info: &CheckInfo) -> String
Auto Trait Implementations§
impl Freeze for ObjectT
impl !RefUnwindSafe for ObjectT
impl Send for ObjectT
impl Sync for ObjectT
impl Unpin for ObjectT
impl !UnwindSafe for ObjectT
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