1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! Extended attributes as a source states them and a read hands them back: a
//! fully-qualified name and its raw value.
//!
//! [`Xattr`] is the boundary form — what `getxattr` would have returned and what `setxattr`
//! would be given — not any family's storage form. A family that packs names into indices,
//! shares a value between inodes, or has nowhere to put an attribute at all does that
//! behind this type, and the family that cannot hold one is the one that says so.
/// One extended attribute: a fully-qualified name (namespace prefix included, e.g.
/// `b"security.capability"`) and its raw value bytes.
///
/// The name carries its namespace as text. A family whose on-disk form splits a known
/// prefix into a compact index, or encodes a value differently from the boundary form,
/// does that when it stores one and undoes it when it reads one back — so an attribute
/// that makes the round trip through an image is the attribute that went in.
///
/// One value has an encoding of its own and is worth naming. A `system.posix_acl_access`
/// or `system.posix_acl_default` attribute holds the version-2 `posix_acl_xattr` bytes
/// [`Acl::encode`](crate::Acl::encode) produces, whatever the family
/// storing it packs those into.
///
/// The type is exhaustive: an attribute is a name and a value, and there is no field it
/// could grow.
/// The first name `xattrs` states a second time, if any.
///
/// An inode holds one value under each attribute name, so a list naming one twice states two
/// values for one attribute. Every family that holds attributes refuses such a list rather than
/// keep one of the values or write both under the one name.
pub
/// Whether two attribute lists state the same attributes, in whatever order.
///
/// Order-insensitive because a source states attributes in the order its producer
/// happened to write them, and a set is what an inode holds. Every model that gives one
/// inode two names asks this question when the second name repeats the first's attributes,
/// which is every family with attributes to repeat.
pub