about summary refs log blame commit diff stats
path: root/src/types/buffersource.nim
blob: 109e836144ce47b2422cb9563b5c0fa462730390 (plain) (tree)
1
2
3
4
5
6




                    
                   









                                           
                                        






                             
import options

when defined(posix):
  import posix

import data/charset
import io/request
import types/url

type
  BufferSourceType* = enum
    CLONE, LOAD_REQUEST, LOAD_PIPE

  BufferSource* = object
    location*: URL
    contenttype*: Option[string] # override
    charset*: Option[Charset] # override
    case t*: BufferSourceType
    of CLONE:
      clonepid*: Pid
    of LOAD_REQUEST:
      request*: Request
    of LOAD_PIPE:
      fd*: FileHandle