[−]Struct gio::Subprocess
Subprocess
allows the creation of and interaction with child
processes.
Processes can be communicated with using standard GIO-style APIs (ie:
InputStream
, OutputStream
). There are GIO-style APIs to wait for
process termination (ie: cancellable and with an asynchronous
variant).
There is an API to force a process to terminate, as well as a race-free API for sending UNIX signals to a subprocess.
One major advantage that GIO brings over the core GLib library is
comprehensive API for asynchronous I/O, such
OutputStreamExt::splice_async
. This makes GSubprocess
significantly more powerful and flexible than equivalent APIs in
some other languages such as the subprocess.py
included with Python. For example, using Subprocess
one could
create two child processes, reading standard output from the first,
processing it, and writing to the input stream of the second, all
without blocking the main loop.
A powerful Subprocess::communicate
API is provided similar to the
communicate()
method of subprocess.py
. This enables very easy
interaction with a subprocess that has been opened with pipes.
Subprocess
defaults to tight control over the file descriptors open
in the child process, avoiding dangling-fd issues that are caused by
a simple fork
/exec
. The only open file descriptors in the
spawned process are ones that were explicitly specified by the
Subprocess
API (unless SubprocessFlags::InheritFds
was
specified).
Subprocess
will quickly reap all child processes as they exit,
avoiding "zombie processes" remaining around for long periods of
time. Subprocess::wait
can be used to wait for this to happen,
but it will happen even without the call being explicitly made.
As a matter of principle, Subprocess
has no API that accepts
shell-style space-separated strings. It will, however, match the
typical shell behaviour of searching the PATH for executables that do
not contain a directory separator in their name.
Subprocess
attempts to have a very simple API for most uses (ie:
spawning a subprocess with arguments and support for most typical
kinds of input and output redirection). See Subprocess::new
. The
SubprocessLauncher
API is provided for more complicated cases
(advanced types of redirection, environment variable manipulation,
change of working directory, child setup functions, etc).
A typical use of Subprocess
will involve calling
Subprocess::new
, followed by Subprocess::wait_async
or
Subprocess::wait
. After the process exits, the status can be
checked using functions such as Subprocess::get_if_exited
(which
are similar to the familiar WIFEXITED-style POSIX macros).
Implements
Methods
impl Subprocess
[src]
pub fn communicate_utf8_async<R: FnOnce(Result<(GString, GString), Error>) + Send + 'static, C: IsA<Cancellable>>(
&self,
stdin_buf: Option<String>,
cancellable: Option<&C>,
callback: R
)
[src]
&self,
stdin_buf: Option<String>,
cancellable: Option<&C>,
callback: R
)
Asynchronous version of Subprocess::communicate_utf8
. Complete
invocation with Subprocess::communicate_utf8_finish
.
stdin_buf
Input data, or None
cancellable
Cancellable
callback
Callback
user_data
User data
pub fn communicate_utf8_async_future(
&self,
stdin_buf: Option<String>
) -> Pin<Box<dyn Future<Output = Result<(GString, GString), Error>> + 'static>>
[src]
&self,
stdin_buf: Option<String>
) -> Pin<Box<dyn Future<Output = Result<(GString, GString), Error>> + 'static>>
impl Subprocess
[src]
pub fn newv(
argv: &[&OsStr],
flags: SubprocessFlags
) -> Result<Subprocess, Error>
[src]
argv: &[&OsStr],
flags: SubprocessFlags
) -> Result<Subprocess, Error>
Create a new process with the given flags and argument list.
The argument list is expected to be None
-terminated.
argv
commandline arguments for the subprocess
flags
flags that define the behaviour of the subprocess
Returns
A newly created Subprocess
, or None
on error (and error
will be set)
pub fn communicate<P: IsA<Cancellable>>(
&self,
stdin_buf: Option<&Bytes>,
cancellable: Option<&P>
) -> Result<(Option<Bytes>, Option<Bytes>), Error>
[src]
&self,
stdin_buf: Option<&Bytes>,
cancellable: Option<&P>
) -> Result<(Option<Bytes>, Option<Bytes>), Error>
Communicate with the subprocess until it terminates, and all input and output has been completed.
If stdin_buf
is given, the subprocess must have been created with
SubprocessFlags::StdinPipe
. The given data is fed to the
stdin of the subprocess and the pipe is closed (ie: EOF).
At the same time (as not to cause blocking when dealing with large
amounts of data), if SubprocessFlags::StdoutPipe
or
SubprocessFlags::StderrPipe
were used, reads from those
streams. The data that was read is returned in stdout
and/or
the stderr
.
If the subprocess was created with SubprocessFlags::StdoutPipe
,
stdout_buf
will contain the data read from stdout. Otherwise, for
subprocesses not created with SubprocessFlags::StdoutPipe
,
stdout_buf
will be set to None
. Similar provisions apply to
stderr_buf
and SubprocessFlags::StderrPipe
.
As usual, any output variable may be given as None
to ignore it.
If you desire the stdout and stderr data to be interleaved, create
the subprocess with SubprocessFlags::StdoutPipe
and
SubprocessFlags::StderrMerge
. The merged result will be returned
in stdout_buf
and stderr_buf
will be set to None
.
In case of any error (including cancellation), false
will be
returned with error
set. Some or all of the stdin data may have
been written. Any stdout or stderr data that has been read will be
discarded. None of the out variables (aside from error
) will have
been set to anything in particular and should not be inspected.
In the case that true
is returned, the subprocess has exited and the
exit status inspection APIs (eg: Subprocess::get_if_exited
,
Subprocess::get_exit_status
) may be used.
You should not attempt to use any of the subprocess pipes after starting this function, since they may be left in strange states, even if the operation was cancelled. You should especially not attempt to interact with the pipes while the operation is in progress (either from another thread or if using the asynchronous version).
stdin_buf
data to send to the stdin of the subprocess, or None
cancellable
a Cancellable
stdout_buf
data read from the subprocess stdout
stderr_buf
data read from the subprocess stderr
Returns
true
if successful
pub fn communicate_async<P: IsA<Cancellable>, Q: FnOnce(Result<(Bytes, Bytes), Error>) + Send + 'static>(
&self,
stdin_buf: Option<&Bytes>,
cancellable: Option<&P>,
callback: Q
)
[src]
&self,
stdin_buf: Option<&Bytes>,
cancellable: Option<&P>,
callback: Q
)
Asynchronous version of Subprocess::communicate
. Complete
invocation with Subprocess::communicate_finish
.
stdin_buf
Input data, or None
cancellable
Cancellable
callback
Callback
user_data
User data
pub fn communicate_async_future(
&self,
stdin_buf: Option<&Bytes>
) -> Pin<Box_<dyn Future<Output = Result<(Bytes, Bytes), Error>> + 'static>>
[src]
&self,
stdin_buf: Option<&Bytes>
) -> Pin<Box_<dyn Future<Output = Result<(Bytes, Bytes), Error>> + 'static>>
pub fn communicate_utf8<P: IsA<Cancellable>>(
&self,
stdin_buf: Option<&str>,
cancellable: Option<&P>
) -> Result<(Option<GString>, Option<GString>), Error>
[src]
&self,
stdin_buf: Option<&str>,
cancellable: Option<&P>
) -> Result<(Option<GString>, Option<GString>), Error>
Like Subprocess::communicate
, but validates the output of the
process as UTF-8, and returns it as a regular NUL terminated string.
On error, stdout_buf
and stderr_buf
will be set to undefined values and
should not be used.
stdin_buf
data to send to the stdin of the subprocess, or None
cancellable
a Cancellable
stdout_buf
data read from the subprocess stdout
stderr_buf
data read from the subprocess stderr
pub fn force_exit(&self)
[src]
Use an operating-system specific method to attempt an immediate,
forceful termination of the process. There is no mechanism to
determine whether or not the request itself was successful;
however, you can use Subprocess::wait
to monitor the status of
the process after calling this function.
On Unix, this function sends SIGKILL
.
pub fn get_exit_status(&self) -> i32
[src]
Check the exit status of the subprocess, given that it exited
normally. This is the value passed to the exit
system call or the
return value from main.
This is equivalent to the system WEXITSTATUS macro.
It is an error to call this function before Subprocess::wait
and
unless Subprocess::get_if_exited
returned true
.
Returns
the exit status
pub fn get_identifier(&self) -> Option<GString>
[src]
On UNIX, returns the process ID as a decimal string.
On Windows, returns the result of GetProcessId() also as a string.
If the subprocess has terminated, this will return None
.
Returns
the subprocess identifier, or None
if the subprocess
has terminated
pub fn get_if_exited(&self) -> bool
[src]
Check if the given subprocess exited normally (ie: by way of exit
or return from main
).
This is equivalent to the system WIFEXITED macro.
It is an error to call this function before Subprocess::wait
has
returned.
Returns
true
if the case of a normal exit
pub fn get_if_signaled(&self) -> bool
[src]
Check if the given subprocess terminated in response to a signal.
This is equivalent to the system WIFSIGNALED macro.
It is an error to call this function before Subprocess::wait
has
returned.
Returns
true
if the case of termination due to a signal
pub fn get_status(&self) -> i32
[src]
Gets the raw status code of the process, as from waitpid
.
This value has no particular meaning, but it can be used with the
macros defined by the system headers such as WIFEXITED. It can also
be used with g_spawn_check_exit_status
.
It is more likely that you want to use Subprocess::get_if_exited
followed by Subprocess::get_exit_status
.
It is an error to call this function before Subprocess::wait
has
returned.
Returns
the (meaningless) waitpid
exit status from the kernel
pub fn get_stderr_pipe(&self) -> Option<InputStream>
[src]
Gets the InputStream
from which to read the stderr output of
self
.
The process must have been created with
SubprocessFlags::StderrPipe
.
Returns
the stderr pipe
pub fn get_stdin_pipe(&self) -> Option<OutputStream>
[src]
Gets the OutputStream
that you can write to in order to give data
to the stdin of self
.
The process must have been created with
SubprocessFlags::StdinPipe
.
Returns
the stdout pipe
pub fn get_stdout_pipe(&self) -> Option<InputStream>
[src]
Gets the InputStream
from which to read the stdout output of
self
.
The process must have been created with
SubprocessFlags::StdoutPipe
.
Returns
the stdout pipe
pub fn get_successful(&self) -> bool
[src]
Checks if the process was "successful". A process is considered
successful if it exited cleanly with an exit status of 0, either by
way of the exit
system call or return from main
.
It is an error to call this function before Subprocess::wait
has
returned.
Returns
true
if the process exited cleanly with a exit status of 0
pub fn get_term_sig(&self) -> i32
[src]
Get the signal number that caused the subprocess to terminate, given that it terminated due to a signal.
This is equivalent to the system WTERMSIG macro.
It is an error to call this function before Subprocess::wait
and
unless Subprocess::get_if_signaled
returned true
.
Returns
the signal causing termination
pub fn send_signal(&self, signal_num: i32)
[src]
Sends the UNIX signal signal_num
to the subprocess, if it is still
running.
This API is race-free. If the subprocess has terminated, it will not be signalled.
This API is not available on Windows.
signal_num
the signal number to send
pub fn wait<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<(), Error>
[src]
&self,
cancellable: Option<&P>
) -> Result<(), Error>
Synchronously wait for the subprocess to terminate.
After the process terminates you can query its exit status with
functions such as Subprocess::get_if_exited
and
Subprocess::get_exit_status
.
This function does not fail in the case of the subprocess having
abnormal termination. See Subprocess::wait_check
for that.
Cancelling cancellable
doesn't kill the subprocess. Call
Subprocess::force_exit
if it is desirable.
cancellable
a Cancellable
Returns
true
on success, false
if cancellable
was cancelled
pub fn wait_async<P: IsA<Cancellable>, Q: FnOnce(Result<(), Error>) + Send + 'static>(
&self,
cancellable: Option<&P>,
callback: Q
)
[src]
&self,
cancellable: Option<&P>,
callback: Q
)
Wait for the subprocess to terminate.
This is the asynchronous version of Subprocess::wait
.
cancellable
a Cancellable
, or None
callback
a GAsyncReadyCallback
to call when the operation is complete
user_data
user_data for callback
pub fn wait_async_future(
&self
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
[src]
&self
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
pub fn wait_check<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<(), Error>
[src]
&self,
cancellable: Option<&P>
) -> Result<(), Error>
Combines Subprocess::wait
with g_spawn_check_exit_status
.
cancellable
a Cancellable
Returns
true
on success, false
if process exited abnormally, or
cancellable
was cancelled
pub fn wait_check_async<P: IsA<Cancellable>, Q: FnOnce(Result<(), Error>) + Send + 'static>(
&self,
cancellable: Option<&P>,
callback: Q
)
[src]
&self,
cancellable: Option<&P>,
callback: Q
)
Combines Subprocess::wait_async
with g_spawn_check_exit_status
.
This is the asynchronous version of Subprocess::wait_check
.
cancellable
a Cancellable
, or None
callback
a GAsyncReadyCallback
to call when the operation is complete
user_data
user_data for callback
pub fn wait_check_async_future(
&self
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
[src]
&self
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Trait Implementations
impl Clone for Subprocess
fn clone(&self) -> Subprocess
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Subprocess
impl Display for Subprocess
[src]
impl Eq for Subprocess
impl Hash for Subprocess
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for Subprocess
fn cmp(&self, other: &Subprocess) -> Ordering
#[must_use]
fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: ObjectType> PartialEq<T> for Subprocess
impl<T: ObjectType> PartialOrd<T> for Subprocess
fn partial_cmp(&self, other: &T) -> Option<Ordering>
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StaticType for Subprocess
fn static_type() -> Type
Auto Trait Implementations
impl RefUnwindSafe for Subprocess
impl !Send for Subprocess
impl !Sync for Subprocess
impl Unpin for Subprocess
impl UnwindSafe for Subprocess
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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<Super, Sub> CanDowncast<Sub> for Super where
Sub: IsA<Super>,
Super: IsA<Super>,
[src]
Sub: IsA<Super>,
Super: IsA<Super>,
impl<T> Cast for T where
T: ObjectType,
[src]
T: ObjectType,
fn upcast<T>(self) -> T where
Self: IsA<T>,
T: ObjectType,
[src]
Self: IsA<T>,
T: ObjectType,
fn upcast_ref<T>(&self) -> &T where
Self: IsA<T>,
T: ObjectType,
[src]
Self: IsA<T>,
T: ObjectType,
fn downcast<T>(self) -> Result<T, Self> where
Self: CanDowncast<T>,
T: ObjectType,
[src]
Self: CanDowncast<T>,
T: ObjectType,
fn downcast_ref<T>(&self) -> Option<&T> where
Self: CanDowncast<T>,
T: ObjectType,
[src]
Self: CanDowncast<T>,
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self> where
T: ObjectType,
[src]
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T> where
T: ObjectType,
[src]
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> T where
T: ObjectType,
[src]
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &T where
T: ObjectType,
[src]
T: ObjectType,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ObjectExt for T where
T: ObjectType,
[src]
T: ObjectType,
fn is<U>(&self) -> bool where
U: StaticType,
[src]
U: StaticType,
fn get_type(&self) -> Type
[src]
fn get_object_class(&self) -> &ObjectClass
[src]
fn set_property<'a, N>(
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError> where
N: Into<&'a str>,
[src]
&self,
property_name: N,
value: &dyn ToValue
) -> Result<(), BoolError> where
N: Into<&'a str>,
fn get_property<'a, N>(&self, property_name: N) -> Result<Value, BoolError> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
fn block_signal(&self, handler_id: &SignalHandlerId)
[src]
fn unblock_signal(&self, handler_id: &SignalHandlerId)
[src]
fn stop_signal_emission(&self, signal_name: &str)
[src]
fn disconnect(&self, handler_id: SignalHandlerId)
[src]
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId where
F: 'static + Send + Sync + Fn(&T, &ParamSpec),
[src]
F: 'static + Send + Sync + Fn(&T, &ParamSpec),
unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
[src]
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId where
F: Fn(&T, &ParamSpec),
fn notify<'a, N>(&self, property_name: N) where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
fn notify_by_pspec(&self, pspec: &ParamSpec)
[src]
fn has_property<'a, N>(
&self,
property_name: N,
type_: Option<Type>
) -> Result<(), BoolError> where
N: Into<&'a str>,
[src]
&self,
property_name: N,
type_: Option<Type>
) -> Result<(), BoolError> where
N: Into<&'a str>,
fn get_property_type<'a, N>(&self, property_name: N) -> Option<Type> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
fn find_property<'a, N>(&self, property_name: N) -> Option<ParamSpec> where
N: Into<&'a str>,
[src]
N: Into<&'a str>,
fn list_properties(&self) -> Vec<ParamSpec>
[src]
fn connect<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
N: Into<&'a str>,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,
N: Into<&'a str>,
fn connect_local<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + 'static,
N: Into<&'a str>,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value> + 'static,
N: Into<&'a str>,
unsafe fn connect_unsafe<'a, N, F>(
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
N: Into<&'a str>,
[src]
&self,
signal_name: N,
after: bool,
callback: F
) -> Result<SignalHandlerId, BoolError> where
F: Fn(&[Value]) -> Option<Value>,
N: Into<&'a str>,
fn emit<'a, N>(
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
[src]
&self,
signal_name: N,
args: &[&dyn ToValue]
) -> Result<Option<Value>, BoolError> where
N: Into<&'a str>,
fn downgrade(&self) -> WeakRef<T>
[src]
fn bind_property<'a, O, N, M>(
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
M: Into<&'a str>,
N: Into<&'a str>,
O: ObjectType,
[src]
&'a self,
source_property: N,
target: &'a O,
target_property: M
) -> BindingBuilder<'a> where
M: Into<&'a str>,
N: Into<&'a str>,
O: ObjectType,
fn ref_count(&self) -> u32
[src]
impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
[src]
t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
fn to_glib_container_from_slice(
_t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
[src]
_t: &'a [T]
) -> (*const GList, <T as ToGlibContainerFromSlice<'a, *const GList>>::Storage)
fn to_glib_full_from_slice(_t: &[T]) -> *const GList
[src]
impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
[src]
t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
fn to_glib_container_from_slice(
_t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
[src]
_t: &'a [T]
) -> (*const GPtrArray, <T as ToGlibContainerFromSlice<'a, *const GPtrArray>>::Storage)
fn to_glib_full_from_slice(_t: &[T]) -> *const GPtrArray
[src]
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
[src]
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
[src]
t: &'a [T]
) -> (*mut GArray, <T as ToGlibContainerFromSlice<'a, *mut GArray>>::Storage)
fn to_glib_full_from_slice(t: &[T]) -> *mut GArray
[src]
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
[src]
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
[src]
t: &'a [T]
) -> (*mut GList, <T as ToGlibContainerFromSlice<'a, *mut GList>>::Storage)
fn to_glib_full_from_slice(t: &[T]) -> *mut GList
[src]
impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
[src]
T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>,
type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)
fn to_glib_none_from_slice(
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
[src]
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
fn to_glib_container_from_slice(
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
[src]
t: &'a [T]
) -> (*mut GPtrArray, <T as ToGlibContainerFromSlice<'a, *mut GPtrArray>>::Storage)
fn to_glib_full_from_slice(t: &[T]) -> *mut GPtrArray
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
[src]
T: ToValue + SetValue + Send + ?Sized,
fn to_send_value(&self) -> SendValue
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src]
T: SetValue + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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>,