Struct lxc_sys::lxc_container

source ·
#[repr(C)]
pub struct lxc_container {
Show 72 fields pub name: *mut c_char, pub configfile: *mut c_char, pub pidfile: *mut c_char, pub slock: *mut lxc_lock, pub privlock: *mut lxc_lock, pub numthreads: c_int, pub lxc_conf: *mut lxc_conf, pub error_string: *mut c_char, pub error_num: c_int, pub daemonize: bool, pub config_path: *mut c_char, pub is_defined: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>, pub state: Option<unsafe extern "C" fn(c: *mut lxc_container) -> *const c_char>, pub is_running: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>, pub freeze: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>, pub unfreeze: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>, pub init_pid: Option<unsafe extern "C" fn(c: *mut lxc_container) -> pid_t>, pub load_config: Option<unsafe extern "C" fn(c: *mut lxc_container, alt_file: *const c_char) -> bool>, pub start: Option<unsafe extern "C" fn(c: *mut lxc_container, useinit: c_int, argv: *const *mut c_char) -> bool>, pub startl: Option<unsafe extern "C" fn(c: *mut lxc_container, useinit: c_int, ...) -> bool>, pub stop: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>, pub want_daemonize: Option<unsafe extern "C" fn(c: *mut lxc_container, state: bool) -> bool>, pub want_close_all_fds: Option<unsafe extern "C" fn(c: *mut lxc_container, state: bool) -> bool>, pub config_file_name: Option<unsafe extern "C" fn(c: *mut lxc_container) -> *mut c_char>, pub wait: Option<unsafe extern "C" fn(c: *mut lxc_container, state: *const c_char, timeout: c_int) -> bool>, pub set_config_item: Option<unsafe extern "C" fn(c: *mut lxc_container, key: *const c_char, value: *const c_char) -> bool>, pub destroy: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>, pub save_config: Option<unsafe extern "C" fn(c: *mut lxc_container, alt_file: *const c_char) -> bool>, pub create: Option<unsafe extern "C" fn(c: *mut lxc_container, t: *const c_char, bdevtype: *const c_char, specs: *mut bdev_specs, flags: c_int, argv: *const *mut c_char) -> bool>, pub createl: Option<unsafe extern "C" fn(c: *mut lxc_container, t: *const c_char, bdevtype: *const c_char, specs: *mut bdev_specs, flags: c_int, ...) -> bool>, pub rename: Option<unsafe extern "C" fn(c: *mut lxc_container, newname: *const c_char) -> bool>, pub reboot: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>, pub shutdown: Option<unsafe extern "C" fn(c: *mut lxc_container, timeout: c_int) -> bool>, pub clear_config: Option<unsafe extern "C" fn(c: *mut lxc_container)>, pub clear_config_item: Option<unsafe extern "C" fn(c: *mut lxc_container, key: *const c_char) -> bool>, pub get_config_item: Option<unsafe extern "C" fn(c: *mut lxc_container, key: *const c_char, retv: *mut c_char, inlen: c_int) -> c_int>, pub get_running_config_item: Option<unsafe extern "C" fn(c: *mut lxc_container, key: *const c_char) -> *mut c_char>, pub get_keys: Option<unsafe extern "C" fn(c: *mut lxc_container, key: *const c_char, retv: *mut c_char, inlen: c_int) -> c_int>, pub get_interfaces: Option<unsafe extern "C" fn(c: *mut lxc_container) -> *mut *mut c_char>, pub get_ips: Option<unsafe extern "C" fn(c: *mut lxc_container, interface: *const c_char, family: *const c_char, scope: c_int) -> *mut *mut c_char>, pub get_cgroup_item: Option<unsafe extern "C" fn(c: *mut lxc_container, subsys: *const c_char, retv: *mut c_char, inlen: c_int) -> c_int>, pub set_cgroup_item: Option<unsafe extern "C" fn(c: *mut lxc_container, subsys: *const c_char, value: *const c_char) -> bool>, pub get_config_path: Option<unsafe extern "C" fn(c: *mut lxc_container) -> *const c_char>, pub set_config_path: Option<unsafe extern "C" fn(c: *mut lxc_container, path: *const c_char) -> bool>, pub clone: Option<unsafe extern "C" fn(c: *mut lxc_container, newname: *const c_char, lxcpath: *const c_char, flags: c_int, bdevtype: *const c_char, bdevdata: *const c_char, newsize: u64, hookargs: *mut *mut c_char) -> *mut lxc_container>, pub console_getfd: Option<unsafe extern "C" fn(c: *mut lxc_container, ttynum: *mut c_int, ptxfd: *mut c_int) -> c_int>, pub console: Option<unsafe extern "C" fn(c: *mut lxc_container, ttynum: c_int, stdinfd: c_int, stdoutfd: c_int, stderrfd: c_int, escape: c_int) -> c_int>, pub attach: Option<unsafe extern "C" fn(c: *mut lxc_container, exec_function: lxc_attach_exec_t, exec_payload: *mut c_void, options: *mut lxc_attach_options_t, attached_process: *mut pid_t) -> c_int>, pub attach_run_wait: Option<unsafe extern "C" fn(c: *mut lxc_container, options: *mut lxc_attach_options_t, program: *const c_char, argv: *const *const c_char) -> c_int>, pub attach_run_waitl: Option<unsafe extern "C" fn(c: *mut lxc_container, options: *mut lxc_attach_options_t, program: *const c_char, arg: *const c_char, ...) -> c_int>, pub snapshot: Option<unsafe extern "C" fn(c: *mut lxc_container, commentfile: *const c_char) -> c_int>, pub snapshot_list: Option<unsafe extern "C" fn(c: *mut lxc_container, snapshots: *mut *mut lxc_snapshot) -> c_int>, pub snapshot_restore: Option<unsafe extern "C" fn(c: *mut lxc_container, snapname: *const c_char, newname: *const c_char) -> bool>, pub snapshot_destroy: Option<unsafe extern "C" fn(c: *mut lxc_container, snapname: *const c_char) -> bool>, pub may_control: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>, pub add_device_node: Option<unsafe extern "C" fn(c: *mut lxc_container, src_path: *const c_char, dest_path: *const c_char) -> bool>, pub remove_device_node: Option<unsafe extern "C" fn(c: *mut lxc_container, src_path: *const c_char, dest_path: *const c_char) -> bool>, pub attach_interface: Option<unsafe extern "C" fn(c: *mut lxc_container, dev: *const c_char, dst_dev: *const c_char) -> bool>, pub detach_interface: Option<unsafe extern "C" fn(c: *mut lxc_container, dev: *const c_char, dst_dev: *const c_char) -> bool>, pub checkpoint: Option<unsafe extern "C" fn(c: *mut lxc_container, directory: *mut c_char, stop: bool, verbose: bool) -> bool>, pub restore: Option<unsafe extern "C" fn(c: *mut lxc_container, directory: *mut c_char, verbose: bool) -> bool>, pub destroy_with_snapshots: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>, pub snapshot_destroy_all: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>, pub migrate: Option<unsafe extern "C" fn(c: *mut lxc_container, cmd: c_uint, opts: *mut migrate_opts, size: c_uint) -> c_int>, pub console_log: Option<unsafe extern "C" fn(c: *mut lxc_container, log: *mut lxc_console_log) -> c_int>, pub reboot2: Option<unsafe extern "C" fn(c: *mut lxc_container, timeout: c_int) -> bool>, pub mount: Option<unsafe extern "C" fn(c: *mut lxc_container, source: *const c_char, target: *const c_char, filesystemtype: *const c_char, mountflags: c_ulong, data: *const c_void, mnt: *mut lxc_mount) -> c_int>, pub umount: Option<unsafe extern "C" fn(c: *mut lxc_container, target: *const c_char, mountflags: c_ulong, mnt: *mut lxc_mount) -> c_int>, pub seccomp_notify_fd: Option<unsafe extern "C" fn(c: *mut lxc_container) -> c_int>, pub seccomp_notify_fd_active: Option<unsafe extern "C" fn(c: *mut lxc_container) -> c_int>, pub init_pidfd: Option<unsafe extern "C" fn(c: *mut lxc_container) -> c_int>, pub devpts_fd: Option<unsafe extern "C" fn(c: *mut lxc_container) -> c_int>,
}

Fields§

§name: *mut c_char§configfile: *mut c_char§pidfile: *mut c_char§slock: *mut lxc_lock§privlock: *mut lxc_lock§numthreads: c_int§lxc_conf: *mut lxc_conf§error_string: *mut c_char§error_num: c_int§daemonize: bool§config_path: *mut c_char§is_defined: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>§state: Option<unsafe extern "C" fn(c: *mut lxc_container) -> *const c_char>§is_running: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>§freeze: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>§unfreeze: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>§init_pid: Option<unsafe extern "C" fn(c: *mut lxc_container) -> pid_t>§load_config: Option<unsafe extern "C" fn(c: *mut lxc_container, alt_file: *const c_char) -> bool>§start: Option<unsafe extern "C" fn(c: *mut lxc_container, useinit: c_int, argv: *const *mut c_char) -> bool>§startl: Option<unsafe extern "C" fn(c: *mut lxc_container, useinit: c_int, ...) -> bool>§stop: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>§want_daemonize: Option<unsafe extern "C" fn(c: *mut lxc_container, state: bool) -> bool>§want_close_all_fds: Option<unsafe extern "C" fn(c: *mut lxc_container, state: bool) -> bool>§config_file_name: Option<unsafe extern "C" fn(c: *mut lxc_container) -> *mut c_char>§wait: Option<unsafe extern "C" fn(c: *mut lxc_container, state: *const c_char, timeout: c_int) -> bool>§set_config_item: Option<unsafe extern "C" fn(c: *mut lxc_container, key: *const c_char, value: *const c_char) -> bool>§destroy: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>§save_config: Option<unsafe extern "C" fn(c: *mut lxc_container, alt_file: *const c_char) -> bool>§create: Option<unsafe extern "C" fn(c: *mut lxc_container, t: *const c_char, bdevtype: *const c_char, specs: *mut bdev_specs, flags: c_int, argv: *const *mut c_char) -> bool>§createl: Option<unsafe extern "C" fn(c: *mut lxc_container, t: *const c_char, bdevtype: *const c_char, specs: *mut bdev_specs, flags: c_int, ...) -> bool>§rename: Option<unsafe extern "C" fn(c: *mut lxc_container, newname: *const c_char) -> bool>§reboot: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>§shutdown: Option<unsafe extern "C" fn(c: *mut lxc_container, timeout: c_int) -> bool>§clear_config: Option<unsafe extern "C" fn(c: *mut lxc_container)>§clear_config_item: Option<unsafe extern "C" fn(c: *mut lxc_container, key: *const c_char) -> bool>§get_config_item: Option<unsafe extern "C" fn(c: *mut lxc_container, key: *const c_char, retv: *mut c_char, inlen: c_int) -> c_int>§get_running_config_item: Option<unsafe extern "C" fn(c: *mut lxc_container, key: *const c_char) -> *mut c_char>§get_keys: Option<unsafe extern "C" fn(c: *mut lxc_container, key: *const c_char, retv: *mut c_char, inlen: c_int) -> c_int>§get_interfaces: Option<unsafe extern "C" fn(c: *mut lxc_container) -> *mut *mut c_char>§get_ips: Option<unsafe extern "C" fn(c: *mut lxc_container, interface: *const c_char, family: *const c_char, scope: c_int) -> *mut *mut c_char>§get_cgroup_item: Option<unsafe extern "C" fn(c: *mut lxc_container, subsys: *const c_char, retv: *mut c_char, inlen: c_int) -> c_int>§set_cgroup_item: Option<unsafe extern "C" fn(c: *mut lxc_container, subsys: *const c_char, value: *const c_char) -> bool>§get_config_path: Option<unsafe extern "C" fn(c: *mut lxc_container) -> *const c_char>§set_config_path: Option<unsafe extern "C" fn(c: *mut lxc_container, path: *const c_char) -> bool>§clone: Option<unsafe extern "C" fn(c: *mut lxc_container, newname: *const c_char, lxcpath: *const c_char, flags: c_int, bdevtype: *const c_char, bdevdata: *const c_char, newsize: u64, hookargs: *mut *mut c_char) -> *mut lxc_container>§console_getfd: Option<unsafe extern "C" fn(c: *mut lxc_container, ttynum: *mut c_int, ptxfd: *mut c_int) -> c_int>§console: Option<unsafe extern "C" fn(c: *mut lxc_container, ttynum: c_int, stdinfd: c_int, stdoutfd: c_int, stderrfd: c_int, escape: c_int) -> c_int>§attach: Option<unsafe extern "C" fn(c: *mut lxc_container, exec_function: lxc_attach_exec_t, exec_payload: *mut c_void, options: *mut lxc_attach_options_t, attached_process: *mut pid_t) -> c_int>§attach_run_wait: Option<unsafe extern "C" fn(c: *mut lxc_container, options: *mut lxc_attach_options_t, program: *const c_char, argv: *const *const c_char) -> c_int>§attach_run_waitl: Option<unsafe extern "C" fn(c: *mut lxc_container, options: *mut lxc_attach_options_t, program: *const c_char, arg: *const c_char, ...) -> c_int>§snapshot: Option<unsafe extern "C" fn(c: *mut lxc_container, commentfile: *const c_char) -> c_int>§snapshot_list: Option<unsafe extern "C" fn(c: *mut lxc_container, snapshots: *mut *mut lxc_snapshot) -> c_int>§snapshot_restore: Option<unsafe extern "C" fn(c: *mut lxc_container, snapname: *const c_char, newname: *const c_char) -> bool>§snapshot_destroy: Option<unsafe extern "C" fn(c: *mut lxc_container, snapname: *const c_char) -> bool>§may_control: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>§add_device_node: Option<unsafe extern "C" fn(c: *mut lxc_container, src_path: *const c_char, dest_path: *const c_char) -> bool>§remove_device_node: Option<unsafe extern "C" fn(c: *mut lxc_container, src_path: *const c_char, dest_path: *const c_char) -> bool>§attach_interface: Option<unsafe extern "C" fn(c: *mut lxc_container, dev: *const c_char, dst_dev: *const c_char) -> bool>§detach_interface: Option<unsafe extern "C" fn(c: *mut lxc_container, dev: *const c_char, dst_dev: *const c_char) -> bool>§checkpoint: Option<unsafe extern "C" fn(c: *mut lxc_container, directory: *mut c_char, stop: bool, verbose: bool) -> bool>§restore: Option<unsafe extern "C" fn(c: *mut lxc_container, directory: *mut c_char, verbose: bool) -> bool>§destroy_with_snapshots: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>§snapshot_destroy_all: Option<unsafe extern "C" fn(c: *mut lxc_container) -> bool>§migrate: Option<unsafe extern "C" fn(c: *mut lxc_container, cmd: c_uint, opts: *mut migrate_opts, size: c_uint) -> c_int>§console_log: Option<unsafe extern "C" fn(c: *mut lxc_container, log: *mut lxc_console_log) -> c_int>§reboot2: Option<unsafe extern "C" fn(c: *mut lxc_container, timeout: c_int) -> bool>§mount: Option<unsafe extern "C" fn(c: *mut lxc_container, source: *const c_char, target: *const c_char, filesystemtype: *const c_char, mountflags: c_ulong, data: *const c_void, mnt: *mut lxc_mount) -> c_int>§umount: Option<unsafe extern "C" fn(c: *mut lxc_container, target: *const c_char, mountflags: c_ulong, mnt: *mut lxc_mount) -> c_int>§seccomp_notify_fd: Option<unsafe extern "C" fn(c: *mut lxc_container) -> c_int>§seccomp_notify_fd_active: Option<unsafe extern "C" fn(c: *mut lxc_container) -> c_int>§init_pidfd: Option<unsafe extern "C" fn(c: *mut lxc_container) -> c_int>§devpts_fd: Option<unsafe extern "C" fn(c: *mut lxc_container) -> c_int>

Trait Implementations§

source§

impl Clone for lxc_container

source§

fn clone(&self) -> lxc_container

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for lxc_container

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for lxc_container

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.