[−][src]Struct gpgme::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]
R: Read + Send + 'data,
pub fn from_seekable_reader<R>(r: R) -> Result<Self, WrappedError<R>> where
R: Read + Seek + Send + 'data,
[src]
R: Read + Seek + Send + 'data,
pub fn from_writer<W>(w: W) -> Result<Self, WrappedError<W>> where
W: Write + Send + 'data,
[src]
W: Write + Send + 'data,
pub fn from_seekable_writer<W>(w: W) -> Result<Self, WrappedError<W>> where
W: Write + Seek + Send + 'data,
[src]
W: Write + Seek + Send + 'data,
pub fn from_stream<S: Send>(s: S) -> Result<Self, WrappedError<S>> where
S: Read + Write + Send + 'data,
[src]
S: Read + Write + Send + 'data,
pub fn from_seekable_stream<S>(s: S) -> Result<Self, WrappedError<S>> where
S: Read + Write + Seek + Send + 'data,
[src]
S: Read + Write + Seek + Send + 'data,
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]
&mut self,
name: impl CStrArgument,
value: impl CStrArgument
) -> Result<()>
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]
impl<'a> IntoData<'a> for Data<'a>
[src]
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]
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
[src]
fn read_vectored(&mut self, bufs: &mut [IoSliceMut]) -> Result<usize, Error>
1.36.0[src]
unsafe fn initializer(&self) -> Initializer
[src]
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
1.0.0[src]
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
1.0.0[src]
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
1.6.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[src]
fn bytes(self) -> Bytes<Self>
1.0.0[src]
fn chain<R>(self, next: R) -> Chain<Self, R> where
R: Read,
1.0.0[src]
R: Read,
fn take(self, limit: u64) -> Take<Self>
1.0.0[src]
impl<'data> Seek for Data<'data>
[src]
fn seek(&mut self, pos: SeekFrom) -> Result<u64>
[src]
fn stream_len(&mut self) -> Result<u64, Error>
[src]
fn stream_position(&mut self) -> Result<u64, Error>
[src]
impl<'data> Write for Data<'data>
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
fn write_vectored(&mut self, bufs: &[IoSlice]) -> Result<usize, Error>
1.36.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
1.0.0[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]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
[src]
Scheme: ApproxScheme,
type Err = NoError
The error type produced by a failed conversion.
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
[src]
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
[src]
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
[src]
impl<Src> ValueFrom<Src> for Src
[src]
type Err = NoError
The error type produced by a failed conversion.
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
[src]
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
[src]
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
[src]
impl<T> ConvUtil for T
[src]
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
[src]
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
[src]
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
fn into_as<Dst>(self) -> Dst where
Self: Into<Dst>,
[src]
Self: Into<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: TryInto<Dst>,
[src]
Self: TryInto<Dst>,
fn value_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ValueInto<Dst>,
[src]
Self: ValueInto<Dst>,
impl<T, Dst> ConvAsUtil<Dst> for T
[src]
fn approx(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
[src]
Self: ApproxInto<Dst, DefaultApprox>,
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
[src]
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
impl<Src> TryFrom<Src> for Src
[src]
type Err = NoError
The error type produced by a failed conversion.
fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>
[src]
impl<Src, Dst> TryInto<Dst> for Src where
Dst: TryFrom<Src>,
[src]
Dst: TryFrom<Src>,