IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
set $CARGO and $RUSTC env vars to also work for users with
rustup paths in their $PATH.
Replace $(pwd) with $PWD
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Since the only reasonable access is by mount "id" and they
don't need to be consecutive (but they are numeric), use a
BTreeMap for MountInfo.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Since nix's Pid type is a strong type, we can add a TryFrom
implementation here as well.
This can later also have the equivalent TryFrom<PidFd>
variant.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Rather than standalone functions, `PidStat` now provides a
`read_for_pid` and `parse` method. Both are public.
One side effect is that the documentation of PidStat's
contents are on the same page as the ways to retrieve it.
Additionally, we deprecate `read_proc_starttime` as it was
reading the entire contents to then filter out one value, in
order to promote caching.
The standalone `read_proc_pid_stat` method is now also
deprecated.
Once we add pid-fds the API will feel cleaner this way.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Rename `ProcFsPidStat` to `PidStat`. It's already in a
procfs submodule anyway. (We have currently no public users
of this type by name.)
Further add pid, ppid and num_threads to PidStat.
Public API change.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Otherwise we cannot pass references to it unless the AsRawFd
implementation was made for the reference itself rather than
the type.
Note that while this changes the public API, we have no
users outside of this crate yet and no public releases,
so I'm not doing a major version bump.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
If enabled, the Schema type implements Eq and PartialEq for
testing the api macro better.
Note that these implementations don't make all too much
since since they also compare `dyn Fn` types which do not
implement Eq. Since they're also `&'static` they can't
really be runtime closures, so this should be fine, we know
they'll always point to some regular function.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
The description comes from the doc comment, the field types
and description from field doc comments and types.
Previously we needed to add at least the hint that the
schema is an object schema. Now we support an empty #[api]
attribute as well.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
infer_type now also returns whether it was encapsualted in
an Option<>. So `type: String, optional: true` is now
inferred propertly from `Option<String>`.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>