pub struct Access {
pub read: Option<Privilege>,
pub write: Option<Privilege>,
pub invoke: Option<Privilege>,
pub qualities: AccessQualities,
}Expand description
What an element supports and what it costs (§7.6).
Fields§
§read: Option<Privilege>The privilege a read needs, or None if the element is not readable.
write: Option<Privilege>The privilege a write needs, or None if the element is not writable.
invoke: Option<Privilege>The privilege an invoke needs, for a command.
qualities: AccessQualitiesThe fabric and timing qualities.
Implementations§
Source§impl Access
impl Access
Sourcepub const fn read_only(privilege: Privilege) -> Self
pub const fn read_only(privilege: Privilege) -> Self
R <privilege> — readable and not writable.
Sourcepub const fn read_write() -> Self
pub const fn read_write() -> Self
RW VO — §7.6’s reading of “an attribute with access ‘RW’”.
Sourcepub const fn read_write_with(read: Privilege, write: Privilege) -> Self
pub const fn read_write_with(read: Privilege, write: Privilege) -> Self
RW with explicit privileges.
Sourcepub const fn write_only(privilege: Privilege) -> Self
pub const fn write_only(privilege: Privilege) -> Self
W <privilege> — writable and not readable.
Sourcepub const fn invoke(privilege: Privilege) -> Self
pub const fn invoke(privilege: Privilege) -> Self
An invocable command. §7.6’s default for a request command is Operate.
Sourcepub const fn with_qualities(self, qualities: AccessQualities) -> Self
pub const fn with_qualities(self, qualities: AccessQualities) -> Self
The same access with extra qualities.
Sourcepub const fn is_readable(&self) -> bool
pub const fn is_readable(&self) -> bool
Whether the element can be read at all.
Sourcepub const fn is_writable(&self) -> bool
pub const fn is_writable(&self) -> bool
Whether the element can be written at all.
Sourcepub const fn needs_timed(&self) -> bool
pub const fn needs_timed(&self) -> bool
Whether a write or invoke requires a Timed interaction (§8.7).
Sourcepub const fn is_fabric_scoped(&self) -> bool
pub const fn is_fabric_scoped(&self) -> bool
Whether the element is fabric-scoped.
Sourcepub const fn is_fabric_sensitive(&self) -> bool
pub const fn is_fabric_sensitive(&self) -> bool
Whether the element is fabric-sensitive.
Sourcepub const fn needs_large_messages(&self) -> bool
pub const fn needs_large_messages(&self) -> bool
Whether the element requires a transport that can carry Large Messages (§7.7.5).