pub struct ContextExplain {
pub context_name: &'static str,
pub fields: &'static [AccountFieldSchema],
pub policies: &'static [&'static str],
pub receipts_expected: bool,
pub mutation_classes: &'static [&'static str],
}Expand description
Human-readable explanation of a context.
Fields§
§context_name: &'static strContext name.
fields: &'static [AccountFieldSchema]Per-account field schemas (full metadata for each account).
policies: &'static [&'static str]Policy name list.
receipts_expected: boolWhether receipts are expected.
mutation_classes: &'static [&'static str]Mutation class name list.
Implementations§
Source§impl ContextExplain
impl ContextExplain
Sourcepub fn from_schema(schema: Option<&'static ContextSchema>) -> Self
pub fn from_schema(schema: Option<&'static ContextSchema>) -> Self
Build an explain from a schema, or return a blank if no schema exists.
Sourcepub fn account_count(&self) -> usize
pub fn account_count(&self) -> usize
Number of accounts in this context.
Sourcepub fn signer_count(&self) -> usize
pub fn signer_count(&self) -> usize
Number of signer accounts.
Sourcepub fn writable_count(&self) -> usize
pub fn writable_count(&self) -> usize
Number of writable accounts.
Auto Trait Implementations§
impl Freeze for ContextExplain
impl RefUnwindSafe for ContextExplain
impl Send for ContextExplain
impl Sync for ContextExplain
impl Unpin for ContextExplain
impl UnsafeUnpin for ContextExplain
impl UnwindSafe for ContextExplain
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