pub struct DeclareGraph { /* private fields */ }
Expand description
used to declare which overload of function is called, or which possiable type is
Implementations§
Source§impl DeclareGraph
impl DeclareGraph
pub fn new() -> Self
pub fn new_static_group<I>(&mut self, at: Span, items: I) -> GroupIdxwhere
I: IntoIterator<Item = Type>,
pub fn build_group(&mut self, gb: GroupBuilder) -> GroupIdx
pub fn apply_filter<T, B>(&mut self, gidx: GroupIdx, defs: &Defs, filter: B)where
T: Types,
B: BranchFilter<T>,
pub fn merge_group(&mut self, at: Span, base: GroupIdx, from: GroupIdx)
Sourcepub fn declare_type(&mut self, at: Span, gidx: GroupIdx, expect_ty: &TypeDefine)
pub fn declare_type(&mut self, at: Span, gidx: GroupIdx, expect_ty: &TypeDefine)
declare a DeclareGroup
’s result is a type
return Err
if the type has be declared and isn’t given type,
or non of Branch
match the given type
pub fn declare_all(&mut self) -> Result<(), Vec<Error>>
pub fn get_type(&self, gidx: GroupIdx) -> &TypeDefine
Trait Implementations§
Source§impl Debug for DeclareGraph
impl Debug for DeclareGraph
Source§impl Default for DeclareGraph
impl Default for DeclareGraph
Source§fn default() -> DeclareGraph
fn default() -> DeclareGraph
Returns the “default value” for a type. Read more
Source§impl Index<Branch> for DeclareGraph
impl Index<Branch> for DeclareGraph
Source§impl Index<GroupIdx> for DeclareGraph
impl Index<GroupIdx> for DeclareGraph
Auto Trait Implementations§
impl Freeze for DeclareGraph
impl RefUnwindSafe for DeclareGraph
impl !Send for DeclareGraph
impl !Sync for DeclareGraph
impl Unpin for DeclareGraph
impl UnwindSafe for DeclareGraph
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