pub struct KonnektorenJs { /* private fields */ }Expand description
KonnektorenJs is the main struct that provides an interface between Rust and JavaScript
for the Konnektoren application. It manages various handlers for different aspects of
the application’s functionality.
Implementations§
Source§impl KonnektorenJs
impl KonnektorenJs
Sourcepub fn set_challenge_data(&self, challenge_data: Custom)
pub fn set_challenge_data(&self, challenge_data: Custom)
Sets the challenge data in the JavaScript environment.
§Arguments
challenge_data- TheCustomchallenge data to be set.
Sourcepub fn set_result_data(&self, result_data: CustomChallengeResult)
pub fn set_result_data(&self, result_data: CustomChallengeResult)
Sets the result data in the JavaScript environment.
§Arguments
result_data- TheCustomChallengeResultto be set.
Sourcepub fn expose_send_event<F>(&self, on_event: F)
pub fn expose_send_event<F>(&self, on_event: F)
Sourcepub fn expose_execute_command<F>(&self, on_command: F)
pub fn expose_execute_command<F>(&self, on_command: F)
Sourcepub fn execute_js(&self, js_code: &str)
pub fn execute_js(&self, js_code: &str)
Executes JavaScript code.
§Arguments
js_code- A string slice containing the JavaScript code to be executed.
Sourcepub fn set_i18n_data(&mut self, i18n_data: Value)
pub fn set_i18n_data(&mut self, i18n_data: Value)
Sets the internationalization (i18n) data.
§Arguments
i18n_data- Aserde_json::Valuecontaining the i18n data.
Sourcepub fn finish_challenge(&self, result: Option<CustomChallengeResult>)
pub fn finish_challenge(&self, result: Option<CustomChallengeResult>)
Finishes the current challenge with an optional result.
§Arguments
result- An optionalCustomChallengeResultrepresenting the result of the challenge.
Auto Trait Implementations§
impl Freeze for KonnektorenJs
impl RefUnwindSafe for KonnektorenJs
impl !Send for KonnektorenJs
impl !Sync for KonnektorenJs
impl Unpin for KonnektorenJs
impl UnwindSafe for KonnektorenJs
Blanket Implementations§
Source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
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
Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an
OutOfBounds error is returned which contains
the unclamped color. Read more