Skip to main content

Kind

Enum Kind 

Source
pub enum Kind {
Show 13 variants Crontab, SystemCrontab, Anacrontab, SystemdUnit, AuthorizedKeys, RcLocal, ShellInit, LdSoPreload, Sudoers, AtJob, InitScript, Pam, SshdConfig,
}
Expand description

A kind of file, each read its own way.

Variants§

§

Crontab

A user’s crontab (var/spool/cron/crontabs/<user>, RHEL’s var/spool/cron/<user>): a schedule, then the command, run as the account the file is named after.

§

SystemCrontab

The system crontabs (etc/crontab, etc/cron.d/*): a schedule, the account, then the command.

§

Anacrontab

etc/anacrontab: period, delay, job id and command, run as root.

§

SystemdUnit

A systemd unit (.service, .timer, .path, .socket) or a drop-in (<unit>.d/*.conf), system-wide or a user’s.

§

AuthorizedKeys

.ssh/authorized_keys (and authorized_keys2): keys that may log in as the account whose home it’s in.

§

RcLocal

etc/rc.local, etc/rc.d/rc.local: run by root at boot.

§

ShellInit

Shell start-up files, run when an account logs in or opens a shell: etc/profile, etc/profile.d/*.sh, etc/bash.bashrc, a home’s .bashrc, .profile, .zshrc, ….

§

LdSoPreload

etc/ld.so.preload: libraries loaded into every dynamically linked program.

§

Sudoers

etc/sudoers, etc/sudoers.d/*: who may run what as whom.

§

AtJob

A job at queued (var/spool/cron/atjobs/*, var/spool/at/*, var/at/jobs/*): commands run once, later, as the account that queued them.

§

InitScript

A System V init script (etc/init.d/*, etc/rc.d/init.d/*): run by root at boot, on systems that still start them.

§

Pam

PAM’s configuration (etc/pam.d/*, etc/pam.conf): the modules every login goes through.

§

SshdConfig

The SSH server’s configuration (etc/ssh/sshd_config, etc/ssh/sshd_config.d/*).

Implementations§

Source§

impl Kind

Source

pub const fn name(self) -> &'static str

A short name: crontab, system crontab, anacrontab, systemd unit, authorized keys, rc.local, shell init, ld.so.preload, sudoers, at job, init script, pam, sshd config.

Trait Implementations§

Source§

impl Clone for Kind

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for Kind

Source§

impl Debug for Kind

Source§

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

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

impl Eq for Kind

Source§

impl Hash for Kind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Kind

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Kind

Auto Trait Implementations§

§

impl Freeze for Kind

§

impl RefUnwindSafe for Kind

§

impl Send for Kind

§

impl Sync for Kind

§

impl Unpin for Kind

§

impl UnsafeUnpin for Kind

§

impl UnwindSafe for Kind

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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 T
where T: Clone,

Source§

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 T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.