Struct rings_core::session::SessionManagerBuilder
source · pub struct SessionManagerBuilder { /* private fields */ }Expand description
SessionManagerBuilder is used to build a SessionManager.
Firstly, you need to provide the authorizer’s entity and type to new method.
Then you can call pack_session to get the session dump for signing.
After signing, you can call sig to set the signature back to builder.
Finally, you can call build to get the SessionManager.
Implementations§
source§impl SessionManagerBuilder
impl SessionManagerBuilder
sourcepub fn new(
authorizer_entity: String,
authorizer_type: String
) -> SessionManagerBuilder
pub fn new( authorizer_entity: String, authorizer_type: String ) -> SessionManagerBuilder
Create a new SessionManagerBuilder. The “authorizer_type” is lower case of Authorizer variant. The “authorizer_entity” refers to the entity that is encapsulated by the Authorizer variant, in string format.
This is a helper method to let user know if the authorizer params is valid.
sourcepub fn pack_session(&self) -> String
pub fn pack_session(&self) -> String
Packs the session into a string for signing.
source§impl SessionManagerBuilder
impl SessionManagerBuilder
sourcepub fn build(self) -> Result<SessionManager>
pub fn build(self) -> Result<SessionManager>
Build the SessionManager.
Auto Trait Implementations§
impl RefUnwindSafe for SessionManagerBuilder
impl Send for SessionManagerBuilder
impl Sync for SessionManagerBuilder
impl Unpin for SessionManagerBuilder
impl UnwindSafe for SessionManagerBuilder
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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