func (f UserFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.UserMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.UserMutation", m)
	}
	return f(ctx, mv)
}
Mutate calls f(ctx, m).
package hook
import (
	"context"
	"fmt"
	"entgo.io/contrib/entproto/internal/entprototest/ent"
)
type BlogPostFunc func(context.Context, *ent.BlogPostMutation) (ent.Value, error)
func (f BlogPostFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.BlogPostMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.BlogPostMutation", m)
	}
	return f(ctx, mv)
}
type CategoryFunc func(context.Context, *ent.CategoryMutation) (ent.Value, error)
func (f CategoryFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.CategoryMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.CategoryMutation", m)
	}
	return f(ctx, mv)
}
type DependsOnSkippedFunc func(context.Context, *ent.DependsOnSkippedMutation) (ent.Value, error)
func (f DependsOnSkippedFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.DependsOnSkippedMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.DependsOnSkippedMutation", m)
	}
	return f(ctx, mv)
}
type DuplicateNumberMessageFunc func(context.Context, *ent.DuplicateNumberMessageMutation) (ent.Value, error)
func (f DuplicateNumberMessageFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.DuplicateNumberMessageMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.DuplicateNumberMessageMutation", m)
	}
	return f(ctx, mv)
}
type ExplicitSkippedMessageFunc func(context.Context, *ent.ExplicitSkippedMessageMutation) (ent.Value, error)
func (f ExplicitSkippedMessageFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.ExplicitSkippedMessageMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ExplicitSkippedMessageMutation", m)
	}
	return f(ctx, mv)
}
type ImageFunc func(context.Context, *ent.ImageMutation) (ent.Value, error)
func (f ImageFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.ImageMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ImageMutation", m)
	}
	return f(ctx, mv)
}
type ImplicitSkippedMessageFunc func(context.Context, *ent.ImplicitSkippedMessageMutation) (ent.Value, error)
func (f ImplicitSkippedMessageFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.ImplicitSkippedMessageMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.ImplicitSkippedMessageMutation", m)
	}
	return f(ctx, mv)
}
type InvalidFieldMessageFunc func(context.Context, *ent.InvalidFieldMessageMutation) (ent.Value, error)
func (f InvalidFieldMessageFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.InvalidFieldMessageMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.InvalidFieldMessageMutation", m)
	}
	return f(ctx, mv)
}
type MessageWithEnumFunc func(context.Context, *ent.MessageWithEnumMutation) (ent.Value, error)
func (f MessageWithEnumFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.MessageWithEnumMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MessageWithEnumMutation", m)
	}
	return f(ctx, mv)
}
type MessageWithFieldOneFunc func(context.Context, *ent.MessageWithFieldOneMutation) (ent.Value, error)
func (f MessageWithFieldOneFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.MessageWithFieldOneMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MessageWithFieldOneMutation", m)
	}
	return f(ctx, mv)
}
type MessageWithIDFunc func(context.Context, *ent.MessageWithIDMutation) (ent.Value, error)
func (f MessageWithIDFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.MessageWithIDMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MessageWithIDMutation", m)
	}
	return f(ctx, mv)
}
type MessageWithOptionalsFunc func(context.Context, *ent.MessageWithOptionalsMutation) (ent.Value, error)
func (f MessageWithOptionalsFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.MessageWithOptionalsMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MessageWithOptionalsMutation", m)
	}
	return f(ctx, mv)
}
type MessageWithPackageNameFunc func(context.Context, *ent.MessageWithPackageNameMutation) (ent.Value, error)
func (f MessageWithPackageNameFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.MessageWithPackageNameMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.MessageWithPackageNameMutation", m)
	}
	return f(ctx, mv)
}
type PortalFunc func(context.Context, *ent.PortalMutation) (ent.Value, error)
func (f PortalFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
	mv, ok := m.(*ent.PortalMutation)
	if !ok {
		return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.PortalMutation", m)
	}
	return f(ctx, mv)
}
type UserFunc func(context.Context, *ent.UserMutation) (ent.Value, error)