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

pub struct Data<'data>(_, _);

Methods

impl<'data> Data<'data>[src]

pub unsafe fn from_raw(raw: gpgme_data_t) -> Self[src]

pub fn as_raw(&self) -> gpgme_data_t[src]

pub fn into_raw(self) -> gpgme_data_t[src]

pub fn stdin() -> Result<Data<'static>>[src]

pub fn stdout() -> Result<Data<'static>>[src]

pub fn stderr() -> Result<Data<'static>>[src]

pub fn new() -> Result<Data<'static>>[src]

Constructs an empty data object.

pub fn load(path: impl CStrArgument) -> Result<Data<'static>>[src]

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

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

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

pub fn from_buffer(buf: &'data impl AsRef<[u8]> + ?Sized) -> Result<Self>[src]

Constructs a data object which copies from buf as needed.

pub fn from_fd(file: &'data impl AsRawFd + ?Sized) -> Result<Self>[src]

pub unsafe fn from_raw_file(file: *mut FILE) -> Result<Self>[src]

pub fn from_reader<R>(r: R) -> Result<Self, WrappedError<R>> where
    R: Read + Send + 'data, 
[src]

pub fn from_seekable_reader<R>(r: R) -> Result<Self, WrappedError<R>> where
    R: Read + Seek + Send + 'data, 
[src]

pub fn from_writer<W>(w: W) -> Result<Self, WrappedError<W>> where
    W: Write + Send + 'data, 
[src]

pub fn from_seekable_writer<W>(w: W) -> Result<Self, WrappedError<W>> where
    W: Write + Seek + Send + 'data, 
[src]

pub fn from_stream<S: Send>(s: S) -> Result<Self, WrappedError<S>> where
    S: Read + Write + Send + 'data, 
[src]

pub fn from_seekable_stream<S>(s: S) -> Result<Self, WrappedError<S>> where
    S: Read + Write + Seek + Send + 'data, 
[src]

pub fn filename(&self) -> Result<&str, Option<Utf8Error>>[src]

pub fn filename_raw(&self) -> Option<&CStr>[src]

pub fn clear_filename(&mut self) -> Result<()>[src]

pub fn set_filename(&mut self, name: impl CStrArgument) -> Result<()>[src]

pub fn encoding(&self) -> Encoding[src]

pub fn set_encoding(&mut self, enc: Encoding) -> Result<()>[src]

pub fn set_flag(
    &mut self,
    name: impl CStrArgument,
    value: impl CStrArgument
) -> Result<()>
[src]

pub fn identify(&mut self) -> Type[src]

pub fn try_into_bytes(self) -> Option<Vec<u8>>[src]

Trait Implementations

impl<'a, 'b> IntoData<'a> for &'b mut Data<'a>[src]

type Output = Self

impl<'a> IntoData<'a> for Data<'a>[src]

type Output = Self

impl<'data> Send for Data<'data>[src]

impl<'data> Drop for Data<'data>[src]

impl<'data> Debug for Data<'data>[src]

impl<'data> Read for Data<'data>[src]

impl<'data> Seek for Data<'data>[src]

impl<'data> Write for Data<'data>[src]

Auto Trait Implementations

impl<'data> !Sync for Data<'data>

impl<'data> Unpin for Data<'data>

impl<'data> !UnwindSafe for Data<'data>

impl<'data> RefUnwindSafe for Data<'data>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
    Scheme: ApproxScheme
[src]

type Err = NoError

The error type produced by a failed conversion.

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
    Dst: ApproxFrom<Src, Scheme>,
    Scheme: ApproxScheme
[src]

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.

impl<Src> ValueFrom<Src> for Src[src]

type Err = NoError

The error type produced by a failed conversion.

impl<Src, Dst> ValueInto<Dst> for Src where
    Dst: ValueFrom<Src>, 
[src]

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.

impl<T> ConvUtil for T[src]

impl<T, Dst> ConvAsUtil<Dst> for T[src]

impl<Src> TryFrom<Src> for Src[src]

type Err = NoError

The error type produced by a failed conversion.

impl<Src, Dst> TryInto<Dst> for Src where
    Dst: TryFrom<Src>, 
[src]

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.