pub struct TestPolicy { /* private fields */ }
๐Deprecated since 8.1.0: Deprecated in favor of concordium-smart-contract-testing.
Expand description
Policy type used by init and receive contexts for testing.
This type should not be used directly, but rather through
its HasPolicy
interface.
Trait Implementationsยง
Sourceยงimpl Clone for TestPolicy
impl Clone for TestPolicy
Sourceยงfn clone(&self) -> TestPolicy
fn clone(&self) -> TestPolicy
Returns a duplicate 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 TestPolicy
impl Debug for TestPolicy
Sourceยงimpl HasPolicy for TestPolicy
impl HasPolicy for TestPolicy
type Iterator = TestIterator
Sourceยงfn identity_provider(&self) -> IdentityProvider
fn identity_provider(&self) -> IdentityProvider
Identity provider who signed the identity object the credential is
derived from.
Sourceยงfn created_at(&self) -> Timestamp
fn created_at(&self) -> Timestamp
Beginning of the month in milliseconds since unix epoch when the
credential was created.
Sourceยงfn valid_to(&self) -> Timestamp
fn valid_to(&self) -> Timestamp
Beginning of the month where the credential is no longer valid, in
milliseconds since unix epoch.
Sourceยงfn next_item(&mut self, buf: &mut [u8; 31]) -> Option<(AttributeTag, u8)>
fn next_item(&mut self, buf: &mut [u8; 31]) -> Option<(AttributeTag, u8)>
Get the next attribute, storing it in the provided buffer.
The return value, if
Some
, is a pair of an attribute tag, and the
length, n
of the attribute value. In this case, the attribute
value is written in the first n
bytes of the provided buffer. The
rest of the buffer is unchanged. Read moreSourceยงfn attributes(&self) -> Self::Iterator
fn attributes(&self) -> Self::Iterator
Get an iterator over all the attributes of the policy.
Auto Trait Implementationsยง
impl Freeze for TestPolicy
impl RefUnwindSafe for TestPolicy
impl !Send for TestPolicy
impl !Sync for TestPolicy
impl Unpin for TestPolicy
impl UnwindSafe for TestPolicy
Blanket Implementationsยง
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