Struct gpgme::data::Data [] [src]

pub struct Data<'a> {
    // some fields omitted
}

Methods

impl<'a> Data<'a>

fn stdin() -> Result<Data<'static>>

fn stdout() -> Result<Data<'static>>

fn stderr() -> Result<Data<'static>>

fn new() -> Result<Data<'static>>

Constructs an empty data object.

fn load<P: Into<Vec<u8>>>(path: P) -> Result<Data<'static>>

Constructs a data object and fills it with the contents of the file referenced by path.

fn from_bytes<B: AsRef<[u8]>>(bytes: B) -> Result<Data<'static>>

Constructs a data object and fills it with a copy of bytes.

fn from_buffer<B: AsRef<[u8]> + ?Sized>(buf: &B) -> Result<Data>

Constructs a data object which copies from buf as needed.

fn from_fd<T: AsRawFd + ?Sized>(file: &T) -> Result<Data>

unsafe fn from_raw_file<'b>(file: *mut FILE) -> Result<Data<'b>>

fn from_reader<R>(r: R) -> Result<Data<'static>, WrappedError<R>> where R: Read + Send + 'static

fn from_seekable_reader<R>(r: R) -> Result<Data<'static>, WrappedError<R>> where R: Read + Seek + Send + 'static

fn from_writer<W>(w: W) -> Result<Data<'static>, WrappedError<W>> where W: Write + Send + 'static

fn from_seekable_writer<W>(w: W) -> Result<Data<'static>, WrappedError<W>> where W: Write + Seek + Send + 'static

fn from_stream<S: Send + 'static>(s: S) -> Result<Data<'static>, WrappedError<S>> where S: Read + Write

fn from_seekable_stream<S>(s: S) -> Result<Data<'static>, WrappedError<S>> where S: Read + Write + Seek + Send + 'static

fn filename(&self) -> StrResult

fn clear_filename(&mut self) -> Result<()>

fn set_filename<S: Into<Vec<u8>>>(&mut self, name: S) -> Result<()>

fn encoding(&self) -> Encoding

fn set_encoding(&mut self, enc: Encoding) -> Result<()>

fn identify(&mut self) -> Type

fn into_bytes(self) -> Option<Vec<u8>>

fn into_string(self) -> Result<String, Option<FromUtf8Error>>

Trait Implementations

impl<'a> Drop for Data<'a>

fn drop(&mut self)

impl<'a> Wrapper for Data<'a>

type Raw = gpgme_data_t

unsafe fn from_raw<'b>(raw: gpgme_data_t) -> Data<'b>

fn as_raw(&self) -> gpgme_data_t

fn into_raw(self) -> Self::Raw where Self: Sized

impl<'a> Read for Data<'a>

fn read(&mut self, buf: &mut [u8]) -> Result<usize>

1.0.0fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

1.0.0fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

1.6.0fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

1.0.0fn by_ref(&mut self) -> &mut Self

1.0.0fn bytes(self) -> Bytes<Self>

fn chars(self) -> Chars<Self>

1.0.0fn chain<R>(self, next: R) -> Chain<Self, R> where R: Read

1.0.0fn take(self, limit: u64) -> Take<Self>

impl<'a> Write for Data<'a>

fn write(&mut self, buf: &[u8]) -> Result<usize>

fn flush(&mut self) -> Result<()>

1.0.0fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

1.0.0fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>

1.0.0fn by_ref(&mut self) -> &mut Self

impl<'a> Seek for Data<'a>

fn seek(&mut self, pos: SeekFrom) -> Result<u64>

Derived Implementations

impl<'a> Debug for Data<'a>

fn fmt(&self, __arg_0: &mut Formatter) -> Result