Thumbnail

@objc(SBDThumbnail)
public class Thumbnail : NSObject, Codable, Injectable
extension Thumbnail: Serializable

Represents a thumbnail information

  • url

    The url of the thumbnail.

    Declaration

    Swift

    @objc
    public var url: String { get }
  • The maximum size of the thumbnail.

    Declaration

    Swift

    @objc
    public private(set) var maxSize: CGSize { get }
  • The real size of the thumbnail.

    Declaration

    Swift

    @objc
    public private(set) var realSize: CGSize { get }
  • The file URL without the ekey.

    Since

    3.0.194

    Declaration

    Swift

    @objc
    public private(set) var plainURL: String? { get }
  • Default constructor.

    Declaration

    Swift

    public required init(from decoder: Decoder) throws

    Parameters

    decoder

    Decoder instance

  • Encodes this object.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    Encoder instance

  • Compares this object with given other object.

    Declaration

    Swift

    public override func isEqual(_ object: Any?) -> Bool

    Parameters

    object

    Any instance

    Return Value

    true if same otherwise false

  • Serializes this object into data

    Declaration

    Swift

    @objc
    public func serialize() -> Data?

    Return Value

    optioanal Data instance

  • Deserializes and reconstructs the object

    Declaration

    Swift

    @objc
    public class func build(fromSerializedData data: Data?) -> `Self`?

    Parameters

    data

    Data instance

    Return Value

    Thumbnail if parameter is valid, otherwise nil