hyphae

package
v0.4.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package hyphae contains things related to working with Mycorrhiza's hyphae.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hypha

type Hypha interface {
	// NameString returns hypha's canonical name.
	NameString() string

	// DoesExist is true when the hypha does exist.
	DoesExist() bool

	// HasText is true when the hypha has a text part.
	HasText() bool

	// HasAttachment is true when the hypha has an attachment.
	HasAttachment() bool
}

Hypha represents a hypha, duh. Only a subset of hyphal operations is in the interface.

type Visitor

type Visitor func(Hypha) (keep bool)

Visitor is a function that looks at the Hypha and, judging by its content, does something. It does not modify the Hypha. These functions are usually packed together in VisitorPack. The function should return false when it does not need to check any hyphae anymore.

type VisitorPack

type VisitorPack struct {
	// HyphaIterator is a channel giving out many a Hypha in no particular order. The channel is read until the end on every iteration.
	HyphaIterator chan Hypha
	// contains filtered or unexported fields
}

VisitorPack is a group of pending Visitor operations.

func (*VisitorPack) AddVisitor

func (pack *VisitorPack) AddVisitor(visitor Visitor)

func (*VisitorPack) Iterate

func (pack *VisitorPack) Iterate()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL