Renderer

com.phasmidsoftware.xmldoc.render.Renderer
See theRenderer companion object
trait Renderer[T] extends NamedFunction[Renderer[T]]

Typeclass to specify the required behavior of an object that you want to render as a String.

Type parameters

T

the type of the object.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def render(t: T, format: Format, stateR: StateR): Try[String]

This is the method which renders an object t of type T as a String, given two other parameters.

This is the method which renders an object t of type T as a String, given two other parameters.

Value parameters

format

the format to render the object in.

stateR

the state of rendering.

t

the object to be rendered.

Attributes

Returns

a String representation of t.

Concrete methods

def lift: Renderer[Option[T]]

Transforms a Renderer for a type T into a Renderer for an Option[T]. Returns an empty string for None and delegates rendering to the wrapped Renderer for Some values, applying the necessary transformations based on rendering state. If the member name is maybeX (as expected), this is transformed into X.

Transforms a Renderer for a type T into a Renderer for an Option[T]. Returns an empty string for None and delegates rendering to the wrapped Renderer for Some values, applying the necessary transformations based on rendering state. If the member name is maybeX (as expected), this is transformed into X.

Attributes

Returns

a Renderer for Option[T], capable of handling both Some and None cases.

Inherited methods

def ^+(w: String): Renderer[T]

Appends the given string to the current name, separated by a colon, and updates the name of the current instance.

Appends the given string to the current name, separated by a colon, and updates the name of the current instance.

Value parameters

w

the string to prepend to the current name.

Attributes

Returns

the instance of the current object cast to type E.

Inherited from:
NamedFunction
def ^^(w: String): Renderer[T]

Updates the name of the current instance and returns it as the specified type.

Updates the name of the current instance and returns it as the specified type.

Value parameters

w

the new name to be assigned.

Attributes

Returns

the instance of the current object cast to type E.

Inherited from:
NamedFunction
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
NamedFunction -> Any
Inherited from:
NamedFunction

Inherited fields

var name: String

Represents the name attribute of a NamedFunction instance.

Represents the name attribute of a NamedFunction instance.

The name is a mutable string variable with a default value of "unnamed". It can be updated via methods such as ^^ and ^+ in the NamedFunction trait.

Attributes

Inherited from:
NamedFunction