// UseParent attachs a parent middleware.
348063
func (s *Layer) UseParent(parent Middleware) Middleware {
	s.mtx.Lock()
	s.parent = parent
	s.mtx.Unlock()
	return s
}
681423
func (p *basePlan) AddParent(parent Plan) {
	p.parents = append(p.parents, parent)
}
57884
func (c *Commit) Parent(n int) (*Commit, error) {
	id, err := c.ParentID(n)
	if err != nil {
		return nil, err
	}
	parent, err := c.repo.getCommit(id)
	if err != nil {
		return nil, err
	}
	return parent, nil
}
470689
func (r *BulkIndexRequest) Parent(parent string) *BulkIndexRequest {
	r.parent = parent
	r.source = nil
	return r
}
710197
func WithParent(context reqContext.Context) ReqContextOptions {
	return func(ctx *requestContextOpts) {
		ctx.parentContext = context
	}
}
388515
func (m *Mux) Use(p plugin.Plugin) *Mux {
	m.Middleware.Use(p)
	return m
}
1070018
func (n *NodeDevice) GetParent() (string, error) {
	var err C.virError
	result := C.virNodeDeviceGetParentWrapper(n.ptr, &err)
	if result == nil {
		return "", makeError(&err)
	}
	defer C.free(unsafe.Pointer(result))
	return C.GoString(result), nil
}
807182
func (l *linkLayerDevice) ParentDevice() (LinkLayerDevice, error) {
	dev, err := l.LinkLayerDevice.ParentDevice()
	if err != nil {
		return nil, errors.Trace(err)
	}
	return &linkLayerDevice{dev}, nil
}
1084358
func (nap *NapNap) UseFunc(aFunc func(c *Context, next HandlerFunc)) {
	nap.Use(MiddlewareFunc(aFunc))
}
1072020
func (p *Pod) UsesOverlay() bool {
	f, err := p.openFile(common.OverlayPreparedFilename, syscall.O_RDONLY)
	defer f.Close()
	return err == nil
}
815182
func (s *DeleteService) Parent(parent string) *DeleteService {
	s.parent = parent
	return s
}
216513
func (rbac *RBAC) SetParent(id string, parent string) error {
	rbac.mutex.Lock()
	defer rbac.mutex.Unlock()
	if _, ok := rbac.roles[id]; !ok {
		return ErrRoleNotExist
	}
	if _, ok := rbac.roles[parent]; !ok {
		return ErrRoleNotExist
	}
	if _, ok := rbac.parents[id]; !ok {
		rbac.parents[id] = make(map[string]struct{})
	}
	var empty struct{}
	rbac.parents[id][parent] = empty
	return nil
}
704251
func WithParent(parent *Node) OptionFunc {
	return func(n *Node) error {
		n.parent = parent
		parent.children = append(parent.children, n)
		n.path = parent.path + "/" + n.Name
		n.depth = parent.depth + 1
		n.pipe = pipe.NewPipe(parent.pipe, n.path)
		return nil
	}
}
981091
func (_class SessionClass) GetParent(sessionID SessionRef, self SessionRef) (_retval SessionRef, _err error) {
	_method := "session.get_parent"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertSessionRefToGo(_method + " -> ", _result.Value)
	return
}
1106238
func (m ModuleInstance) Parent() ModuleInstance {
	if len(m) == 0 {
		return m
	}
	return m[:len(m)-1]
}
301170
func (s *TermvectorsService) Parent(parent string) *TermvectorsService {
	s.parent = parent
	return s
}
358303
func (w *Weavebox) Use(handlers ...Middleware) {
	for _, h := range handlers {
		w.middleware = append(w.middleware, h)
	}
}