// GENERATED — DO NOT EDIT

///|
/// [Upstream documentation](https://docs.gtk.org/gio/class.MemoryInputStream.html).
pub type MemoryInputStream

///|
pub(open) trait IMemoryInputStream {
  fn as_memory_input_stream(Self) -> MemoryInputStream
  fn add_bytes(Self, Bytes) -> Unit = _
}

///|
pub impl IMemoryInputStream for MemoryInputStream with fn as_memory_input_stream(
  self,
) {
  self
}

///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.MemoryInputStream.new.html).
pub extern "c" fn MemoryInputStream::new() -> MemoryInputStream = "moonbit_g_memory_input_stream_new"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/ctor.MemoryInputStream.new_from_bytes.html).
#borrow(bytes)
pub extern "c" fn MemoryInputStream::new_from_bytes(
  bytes : Bytes,
) -> MemoryInputStream = "moonbit_g_memory_input_stream_new_from_bytes"

///|
/// [Upstream documentation](https://docs.gtk.org/gio/method.MemoryInputStream.add_bytes.html).
#borrow(self, bytes)
pub extern "c" fn MemoryInputStream::add_bytes(
  self : MemoryInputStream,
  bytes : Bytes,
) = "moonbit_g_memory_input_stream_add_bytes"

///|
impl IMemoryInputStream with fn add_bytes(self, bytes) -> Unit {
  self.as_memory_input_stream().add_bytes(bytes)
}

///|
pub fn MemoryInputStream::as_input_stream(
  self : MemoryInputStream,
) -> InputStream = "%identity"

///|
pub impl IInputStream for MemoryInputStream with fn as_input_stream(self) {
  self.as_input_stream()
}

///|
pub fn MemoryInputStream::as_gobject_object(
  self : MemoryInputStream,
) -> @gobject.Object = "%identity"

///|
pub impl @gobject.IObject for MemoryInputStream with fn as_object(self) {
  self.as_gobject_object()
}

///|
pub fn MemoryInputStream::as_pollable_input_stream(
  self : MemoryInputStream,
) -> PollableInputStream = "%identity"

///|
pub impl IPollableInputStream for MemoryInputStream with fn as_pollable_input_stream(
  self,
) {
  self.as_pollable_input_stream()
}

///|
pub fn MemoryInputStream::as_seekable(self : MemoryInputStream) -> Seekable = "%identity"

///|
pub impl ISeekable for MemoryInputStream with fn as_seekable(self) {
  self.as_seekable()
}