enum

QBittorrent::Model::PieceState

Inherits Enum < Comparable < Value < Object

Piece state int (torrents/pieceStates element).

Constants

NotDownloaded = 0

Piece not downloaded yet.

Downloading = 1

Piece requested / currently downloading.

Downloaded = 2

Piece already downloaded.

Constructors

new(pull : JSON::PullParser) : self

Strict decode: raises on an integer with no matching member.

Source

Instance methods

downloaded?

Returns true if this enum value equals Downloaded

Source
downloading?

Returns true if this enum value equals Downloading

Source
not_downloaded?

Returns true if this enum value equals NotDownloaded

Source
to_json(json : JSON::Builder) : Nil

Serializes to the documented integer value.

Source