Skip to main content

GlobalEditHandle

Struct GlobalEditHandle 

Source
pub struct GlobalEditHandle { /* private fields */ }
Available on crate feature generic only.
Expand description

グローバルに EditHandle を保持するための構造体。

OnceLock と違い、もし初期化していない状態でアクセスした場合にパニックします。

Implementations§

Source§

impl GlobalEditHandle

Source

pub const fn new() -> Self

新しいインスタンスを作成する。

Source

pub fn init(&self, edit_handle: EditHandle)

初期化する。すでに初期化されている場合は警告をログに出力します。

Source

pub fn is_ready(&self) -> bool

初期化されているかどうかを確認します。

Methods from Deref<Target = EditHandle>§

Source

pub fn is_ready(&self) -> bool

編集ハンドルが使用可能かどうかを確認します。

Source

pub fn call_edit_section<'a, T, F>( &self, callback: F, ) -> Result<T, EditHandleError>
where T: Send + 'static, F: FnOnce(&mut EditSection) -> T + Send + 'a,

プロジェクトデータの編集を開始する。

§Note

内部では call_edit_section_param を使用しています。

Source

pub fn call_read_section<'a, T, F>( &self, callback: F, ) -> Result<T, EditHandleError>
where T: Send + 'static, F: FnOnce(&ReadSection) -> T + Send + 'a,

プロジェクトデータの参照を開始する。

§Note

内部では call_read_section_param を使用しています。

Source

pub fn get_edit_info(&self) -> EditInfo

編集情報を取得する。

Source

pub fn restart_host_app(&self)

ホストアプリケーションを再起動する。

Source

pub fn enumerate_effects<F>(&self, callback: F)
where F: FnMut(Effect),

エフェクトの一覧をコールバック関数で取得する。

§Note

不明なエフェクト種別があった場合はスキップされます。

Source

pub fn get_effects(&self) -> Vec<Effect>

エフェクトの一覧を取得する。

Source

pub fn enumerate_effect_items<F>( &self, effect: &str, callback: F, ) -> Result<(), EditHandleError>

エフェクトの設定項目一覧をコールバック関数で取得する。

§Arguments
  • effect: 対象のエフェクト名。エイリアスファイルの effect.name を指定します。
§Note

不明な設定項目種別があった場合はスキップされます。

Source

pub fn get_effect_items( &self, effect: &str, ) -> Result<Vec<EffectItemInfo>, EditHandleError>

エフェクトの設定項目一覧を取得する。

§Arguments
  • effect: 対象のエフェクト名。エイリアスファイルの effect.name を指定します。
Source

pub fn enumerate_modules<F>(&self, callback: F)
where F: FnMut(ModuleInfo),

モジュールの一覧をコールバック関数で取得する。

Source

pub fn get_modules(&self) -> Vec<ModuleInfo>

モジュールの一覧を取得する。

Source

pub fn get_host_app_window_raw(&self) -> Option<Win32WindowHandle>

ホストアプリケーションのメインウィンドウのハンドルをraw_window_handle::Win32WindowHandleとして取得する。

Source

pub unsafe fn get_host_app_window(&self) -> Option<WindowHandle<'_>>

ホストアプリケーションのメインウィンドウのハンドルを[raw_window_handle::WindowHandle]として取得する。

§Safety

[raw_window_handle::WindowHandle::borrow_raw] を参照してください。

Source

pub fn get_edit_state(&self) -> Result<EditState, EditHandleError>

編集状態を取得する。

Trait Implementations§

Source§

impl Debug for GlobalEditHandle

Source§

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

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

impl Default for GlobalEditHandle

Source§

fn default() -> Self

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

impl Deref for GlobalEditHandle

Source§

type Target = EditHandle

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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