Struct tss_esapi::attributes::locality::LocalityAttributes
source · pub struct LocalityAttributes(pub TPMA_LOCALITY);
Expand description
Bitfield representing the locality attributes.
Tuple Fields§
§0: TPMA_LOCALITY
Implementations§
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<T> BitRangeMut<T> for LocalityAttributeswhere
TPMA_LOCALITY: BitRangeMut<T>,
impl<T> BitRangeMut<T> for LocalityAttributeswhere
TPMA_LOCALITY: BitRangeMut<T>,
source§fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)
fn set_bit_range(&mut self, msb: usize, lsb: usize, value: T)
Set a range of bits.
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 for LocalityAttributes
impl PartialEq 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 ==
.impl Copy for LocalityAttributes
impl Eq for LocalityAttributes
impl StructuralPartialEq for LocalityAttributes
Auto Trait Implementations§
impl Freeze for LocalityAttributes
impl RefUnwindSafe for LocalityAttributes
impl Send for LocalityAttributes
impl Sync for LocalityAttributes
impl Unpin for LocalityAttributes
impl UnwindSafe for LocalityAttributes
Blanket Implementations§
source§impl<T> BitMut for Twhere
T: BitRangeMut<u8>,
impl<T> BitMut for Twhere
T: BitRangeMut<u8>,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more