Trait sindra::ty::Typed
[−]
[src]
pub trait Typed<T: Type> { fn ty(&self) -> Option<T>; fn set_type(&mut self, ty: Option<T>); fn promoted(&self) -> Option<T>; fn promote_type(&self) -> Option<T> { ... } fn set_promote_type(&mut self, ty: Option<T>) { ... } }
Methods for accessing Type information for an object.
Required Methods
fn ty(&self) -> Option<T>
Retrieve the Type (if set).
fn set_type(&mut self, ty: Option<T>)
Set (or unset if passing None
) the Type.
fn promoted(&self) -> Option<T>
Retrieve promoted type, if any type is set.
Provided Methods
fn promote_type(&self) -> Option<T>
Retrieve the promotion Type (if set). Defaults to ty()
if not implemented.
fn set_promote_type(&mut self, ty: Option<T>)
Set (or unset if passing None
) the promotion Type. Default to set_type()
if not
implemented.