UploadEvent enum

Which of an upload stream's three shapes one line is.

The discriminator, and it is read after DocumentKind rather than instead of it. kind says which store's stream this is and therefore which schema counter applies; this says what the line carries. Both are on every line, because a line is the unit a reader gets — there is no enclosing document to have said it once.

Closed, with no unknown member, on the same argument as DocumentKind: these are this package's own names, so one a reader does not recognize means a stream from a version that knows more than the reader does. Skip the line rather than refusing the stream, which is the one place an upload stream departs from a document: a document is refused whole because it is read whole, and a stream that stops being read on its first unknown line throws away the UploadEvent.result that says the run finished.

Inheritance
Available extensions
Annotations
  • @JsonEnum.new(valueField: 'wire')

Values

state → const UploadEvent

The upload moved into a new UploadState, carried in state.

const UploadEvent('state')
progress → const UploadEvent

Bytes the store has taken, carried in bytesSent beside bytesTotal.

play.upload only. appstore.upload emits none, and AppStoreUploadEvent says why — the reason is a property of the transport rather than something this member can carry.

const UploadEvent('progress')
result → const UploadEvent

The run finished, carrying what it did in result.

Exactly once, as the last line, and only on success. A failure ends the stream where it happened and reports on stderr with a non-zero exit, which is json-output.md's "errors stay prose on stderr" applied to a stream: a stream with no result line did not finish. So a reader has a positive completion marker rather than having to prove a negative from an exit code and a last line.

const UploadEvent('result')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
wire String
The value carried in the line's event field.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<UploadEvent>
A constant List of the values in this enum, in order of their declaration.