#[non_exhaustive]pub struct Mechanism {
pub mechanism: &'static Mechname,
/* private fields */
}Expand description
Mechanism Implementation
NOTE: The API of custom mechanisms is not stable. You MUST NOT rely on API stability over minor version releases of rsasl.
All mechanisms need to export a static Mechanism to be usable by rsasl, see the
registry module documentation for details.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mechanism: &'static MechnameThe Mechanism served by this implementation.
Implementations§
Source§impl Mechanism
impl Mechanism
Sourcepub const fn build(
mechanism: &'static Mechname,
priority: usize,
client: Option<StartFn>,
server: Option<ServerStartFn>,
first: Side,
select: fn(bool) -> Option<Selection>,
offer: fn(bool) -> bool,
) -> Self
pub const fn build( mechanism: &'static Mechname, priority: usize, client: Option<StartFn>, server: Option<ServerStartFn>, first: Side, select: fn(bool) -> Option<Selection>, offer: fn(bool) -> bool, ) -> Self
Construct a Mechanism constant for custom mechanisms
NOTE: The API of custom mechanisms is not stable. You MUST NOT rely on API stability over minor version releases of rsasl.
Trait Implementations§
impl Copy for Mechanism
Auto Trait Implementations§
impl Freeze for Mechanism
impl RefUnwindSafe for Mechanism
impl Send for Mechanism
impl Sync for Mechanism
impl Unpin for Mechanism
impl UnwindSafe for Mechanism
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