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
sourceimpl 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
sourceimpl 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
sourceimpl<T> BitRange<T> for LocalityAttributes where
TPMA_LOCALITY: BitRange<T>,
impl<T> BitRange<T> for LocalityAttributes where
TPMA_LOCALITY: BitRange<T>,
sourceimpl Clone for LocalityAttributes
impl Clone for LocalityAttributes
sourcefn clone(&self) -> LocalityAttributes
fn clone(&self) -> LocalityAttributes
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LocalityAttributes
impl Debug for LocalityAttributes
sourceimpl From<LocalityAttributes> for TPMA_LOCALITY
impl From<LocalityAttributes> for TPMA_LOCALITY
sourcefn from(locality_attributes: LocalityAttributes) -> Self
fn from(locality_attributes: LocalityAttributes) -> Self
Performs the conversion.
sourceimpl From<u8> for LocalityAttributes
impl From<u8> for LocalityAttributes
sourcefn from(tpma_locality: TPMA_LOCALITY) -> Self
fn from(tpma_locality: TPMA_LOCALITY) -> Self
Performs the conversion.
sourceimpl PartialEq<LocalityAttributes> for LocalityAttributes
impl PartialEq<LocalityAttributes> for LocalityAttributes
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &LocalityAttributes) -> bool
fn ne(&self, other: &LocalityAttributes) -> bool
This method tests for !=
.
impl Copy for LocalityAttributes
impl Eq for LocalityAttributes
impl StructuralEq for LocalityAttributes
impl StructuralPartialEq for LocalityAttributes
Auto Trait Implementations
impl RefUnwindSafe for LocalityAttributes
impl Send for LocalityAttributes
impl Sync for LocalityAttributes
impl Unpin for LocalityAttributes
impl UnwindSafe for LocalityAttributes
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more