pub struct MethodCatalogBuilder { /* private fields */ }Expand description
Builder for MethodCatalog. Enforces the duplicate-entry invariant at
finish.
Implementations§
Source§impl MethodCatalogBuilder
impl MethodCatalogBuilder
Sourcepub fn entry(self, entry: MethodEntry) -> Self
pub fn entry(self, entry: MethodEntry) -> Self
Add an entry. Duplicates are detected at finish.
Sourcepub fn finish(self) -> Result<MethodCatalog, MethodCatalogError>
pub fn finish(self) -> Result<MethodCatalog, MethodCatalogError>
Finalize the catalog, returning an error if any two entries share a
(receiver, name, arity) triple, if any single entry bounds one type
variable two different ways, or if a concrete row shadows a generic
Iterable one on a receiver both accept (ADR-127).
Trait Implementations§
Source§impl Default for MethodCatalogBuilder
impl Default for MethodCatalogBuilder
Source§fn default() -> MethodCatalogBuilder
fn default() -> MethodCatalogBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MethodCatalogBuilder
impl RefUnwindSafe for MethodCatalogBuilder
impl Send for MethodCatalogBuilder
impl Sync for MethodCatalogBuilder
impl Unpin for MethodCatalogBuilder
impl UnsafeUnpin for MethodCatalogBuilder
impl UnwindSafe for MethodCatalogBuilder
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