Skip to main content

Hooks

Struct Hooks 

Source
pub struct Hooks<Az = OpenAuthorizer, Ad = DefaultAdmission, Pr = NoPreReceive, Rs = NoReceipts, Os = NoOutcomes> {
    pub authorizer: Az,
    pub admission: Ad,
    pub pre_receive: Pr,
    pub receipts: Rs,
    pub outcomes: Os,
}
Expand description

A HookSet from one value per stage; Hooks::default() is M0’s.

Fields§

§authorizer: Az

Stage 2.

§admission: Ad

Stage 3.

§pre_receive: Pr

Stage 5.

§receipts: Rs

Stage 7.

§outcomes: Os

Stage 8.

Implementations§

Source§

impl Hooks

Source

pub fn new() -> Self

M0’s hooks: open authorization and the default admission quota.

Trait Implementations§

Source§

impl<Az: Clone, Ad: Clone, Pr: Clone, Rs: Clone, Os: Clone> Clone for Hooks<Az, Ad, Pr, Rs, Os>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Az: Debug, Ad: Debug, Pr: Debug, Rs: Debug, Os: Debug> Debug for Hooks<Az, Ad, Pr, Rs, Os>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Az: Default, Ad: Default, Pr: Default, Rs: Default, Os: Default> Default for Hooks<Az, Ad, Pr, Rs, Os>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<Az, Ad, Pr, Rs, Os> HookSet for Hooks<Az, Ad, Pr, Rs, Os>

Source§

type Az = Az

Stage 2.
Source§

type Ad = Ad

Stage 3.
Source§

type Pr = Pr

Stage 5.
Source§

type Rs = Rs

Stage 7.
Source§

type Os = Os

Stage 8.
Source§

fn authorizer(&self) -> &Az

The authorizer.
Source§

fn admission(&self) -> &Ad

The admission step.
Source§

fn pre_receive(&self) -> &Pr

The pre-receive checks.
Source§

fn receipts(&self) -> &Rs

The receipt signer.
Source§

fn outcomes(&self) -> &Os

The outcome sink.

Auto Trait Implementations§

§

impl<Az, Ad, Pr, Rs, Os> Freeze for Hooks<Az, Ad, Pr, Rs, Os>
where Az: Freeze, Ad: Freeze, Pr: Freeze, Rs: Freeze, Os: Freeze,

§

impl<Az, Ad, Pr, Rs, Os> RefUnwindSafe for Hooks<Az, Ad, Pr, Rs, Os>

§

impl<Az, Ad, Pr, Rs, Os> Send for Hooks<Az, Ad, Pr, Rs, Os>
where Az: Send, Ad: Send, Pr: Send, Rs: Send, Os: Send,

§

impl<Az, Ad, Pr, Rs, Os> Sync for Hooks<Az, Ad, Pr, Rs, Os>
where Az: Sync, Ad: Sync, Pr: Sync, Rs: Sync, Os: Sync,

§

impl<Az, Ad, Pr, Rs, Os> Unpin for Hooks<Az, Ad, Pr, Rs, Os>
where Az: Unpin, Ad: Unpin, Pr: Unpin, Rs: Unpin, Os: Unpin,

§

impl<Az, Ad, Pr, Rs, Os> UnsafeUnpin for Hooks<Az, Ad, Pr, Rs, Os>

§

impl<Az, Ad, Pr, Rs, Os> UnwindSafe for Hooks<Az, Ad, Pr, Rs, Os>
where Az: UnwindSafe, Ad: UnwindSafe, Pr: UnwindSafe, Rs: UnwindSafe, Os: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> MaybeSync for T
where T: Sync + ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more