Struct tss_esapi::attributes::locality::LocalityAttributes
source · pub struct LocalityAttributes(pub TPMA_LOCALITY);Expand description
Bitfield representing the locality attributes.
Tuple Fields§
§0: TPMA_LOCALITYImplementations§
source§impl LocalityAttributes
impl LocalityAttributes
pub fn locality_zero(&self) -> bool
pub fn locality_one(&self) -> bool
pub fn locality_two(&self) -> bool
pub fn locality_three(&self) -> bool
pub fn locality_four(&self) -> bool
source§impl LocalityAttributes
impl LocalityAttributes
pub const LOCALITY_ZERO: LocalityAttributes = _
pub const LOCALITY_ONE: LocalityAttributes = _
pub const LOCALITY_TWO: LocalityAttributes = _
pub const LOCALITY_THREE: LocalityAttributes = _
pub const LOCALITY_FOUR: LocalityAttributes = _
sourcepub fn is_extended(&self) -> bool
pub fn is_extended(&self) -> bool
Returns true if the attributes are extended
sourcepub fn as_extended(&self) -> Result<u8>
pub fn as_extended(&self) -> Result<u8>
Returns the LocalityAttributes as a number.
Errors
If the attributes are not extended en InvalidParams error is returned.
sourcepub const fn builder() -> LocalityAttributesBuilder
pub const fn builder() -> LocalityAttributesBuilder
Returns the builder used to construct LocalAttributes.
Trait Implementations§
source§impl<T> BitRange<T> for LocalityAttributeswhere
TPMA_LOCALITY: BitRange<T>,
impl<T> BitRange<T> for LocalityAttributeswhere
TPMA_LOCALITY: BitRange<T>,
source§impl Clone for LocalityAttributes
impl Clone for LocalityAttributes
source§fn clone(&self) -> LocalityAttributes
fn clone(&self) -> LocalityAttributes
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for LocalityAttributes
impl Debug for LocalityAttributes
source§impl From<LocalityAttributes> for TPMA_LOCALITY
impl From<LocalityAttributes> for TPMA_LOCALITY
source§fn from(locality_attributes: LocalityAttributes) -> Self
fn from(locality_attributes: LocalityAttributes) -> Self
Converts to this type from the input type.
source§impl From<u8> for LocalityAttributes
impl From<u8> for LocalityAttributes
source§fn from(tpma_locality: TPMA_LOCALITY) -> Self
fn from(tpma_locality: TPMA_LOCALITY) -> Self
Converts to this type from the input type.
source§impl PartialEq<LocalityAttributes> for LocalityAttributes
impl PartialEq<LocalityAttributes> for LocalityAttributes
source§fn eq(&self, other: &LocalityAttributes) -> bool
fn eq(&self, other: &LocalityAttributes) -> bool
This method tests for
self and other values to be equal, and is used
by ==.