API reference

lib.rs · Rust types

Browse entries grouped by interface file. Expand an entry for declarations, usage and version boundaries.

Read the related guide →

Entries retain declarations and sources. Runtime verification is recorded per entry; internal source candidates are not a promise of SDK delivery.

sdk/rust/src/lib.rs
kui::Document
Declared3.61.7Rust

Public Rust SDK struct Document. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct Document {
    raw: NonNull<sys::KuiDocument>,
    _not_send: PhantomData<Rc<()>>,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:374

Report an issue with this entry →
kui::Element
Declared3.61.7Rust

Public Rust SDK struct Element. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct Element<'doc> {
    raw: NonNull<sys::KuiElement>,
    document: &'doc Document,
    _not_send: PhantomData<Rc<()>>,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:508

Report an issue with this entry →
kui::Error
Declared3.61.7Rust

Public Rust SDK struct Error. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct Error {
    status: sys::KuiStatus,
    context: &'static str,
    message: String,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:20

Report an issue with this entry →
kui::ExtensionValue
Declared3.61.7Rust

Public Rust SDK enum ExtensionValue. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub enum ExtensionValue {
    /// nil。
    Nil,
    /// 整数。
    Integer(i64),
    /// 浮点。
    Number(f64),
    /// UTF-8 字符串。
    String(String),
    /// 布尔。
    Boolean(bool),
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:924

Report an issue with this entry →
kui::HTTPClient
Declared3.61.7Rust

Public Rust SDK struct HTTPClient. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct HTTPClient {
    raw: NonNull<sys::KuiHttpClient>,
    _not_send: PhantomData<Rc<()>>,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:756

Report an issue with this entry →
kui::HTTPResponse
Declared3.61.7Rust

Public Rust SDK struct HTTPResponse. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct HTTPResponse {
    /// HTTP 状态码。
    pub status: i32,
    /// 响应体。
    pub body: Vec<u8>,
    /// Content-Type。
    pub content_type: String,
    /// 后端错误文本。
    pub error: String,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:745

Report an issue with this entry →
kui::PDFOptions
Declared3.61.7Rust

Public Rust SDK struct PDFOptions. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct PDFOptions {
    /// 标题。
    pub title: String,
    /// 作者。
    pub author: String,
    /// 主题。
    pub subject: String,
    /// 关键字。
    pub keywords: String,
    /// 创建者。
    pub creator: String,
    /// 创建日期。
    pub creation_date: String,
    /// 页面宽度(pt)。
    pub page_width_pt: f32,
    /// 页面高度(pt)。
    pub page_height_pt: f32,
    /// 栅格化字体。
    pub rasterize_fonts: bool,
    /// 生成 outline。
    pub generate_outline: bool,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:869

Report an issue with this entry →
kui::Platform
Declared3.61.7Rust

Public Rust SDK struct Platform. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct Platform {
    _not_send: PhantomData<Rc<()>>,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:144

Report an issue with this entry →
kui::Point
Declared3.61.7Rust

Public Rust SDK struct Point. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct Point {
    /// X。
    pub x: f32,
    /// Y。
    pub y: f32,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:116

Report an issue with this entry →
kui::Rect
Declared3.61.7Rust

Public Rust SDK struct Rect. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct Rect {
    /// X。
    pub x: f32,
    /// Y。
    pub y: f32,
    /// 宽度。
    pub width: f32,
    /// 高度。
    pub height: f32,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:132

Report an issue with this entry →
kui::ScriptEngine
Declared3.61.7Rust

Public Rust SDK struct ScriptEngine. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct ScriptEngine {
    raw: NonNull<sys::KuiScriptEngine>,
    _not_send: PhantomData<Rc<()>>,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:673

Report an issue with this entry →
kui::ScriptResult
Declared3.61.7Rust

Public Rust SDK struct ScriptResult. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct ScriptResult {
    /// 是否成功。
    pub success: bool,
    /// Lua 错误文本。
    pub error: String,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:666

Report an issue with this entry →
kui::Size
Declared3.61.7Rust

Public Rust SDK struct Size. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct Size {
    /// 宽度。
    pub width: f32,
    /// 高度。
    pub height: f32,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:124

Report an issue with this entry →
kui::Version
Declared3.61.7Rust

Public Rust SDK struct Version. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct Version {
    /// 主版本。
    pub major: i32,
    /// 次版本。
    pub minor: i32,
    /// 修订版本。
    pub patch: i32,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:96

Report an issue with this entry →
kui::Window
Declared3.61.7Rust

Public Rust SDK struct Window. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct Window {
    raw: NonNull<sys::KuiWindow>,
    _not_send: PhantomData<Rc<()>>,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:254

Report an issue with this entry →
kui::WindowProps
Declared3.61.7Rust

Public Rust SDK struct WindowProps. Check its type contract for ownership and UI-thread restrictions.

lib.rs
pub struct WindowProps {
    /// 标题。
    pub title: String,
    /// 客户区宽度。
    pub width: i32,
    /// 客户区高度。
    pub height: i32,
    /// 禁止调整大小。
    pub no_resize: bool,
    /// 禁止系统装饰。
    pub no_decorations: bool,
    /// 透明窗口。
    pub transparent: bool,
    /// 总在最前。
    pub always_on_top: bool,
    /// 居中。
    pub centered: bool,
    /// 无框模式。
    pub frameless: bool,
    /// 初始不透明度;0 使用运行时默认 1。
    pub opacity: f32,
}

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:214

Report an issue with this entry →
Result
Declared3.61.7Rust

Public Rust SDK type Result; see the declaration for its exact definition.

lib.rs
pub type Result<T> = std::result::Result<T, Error>;

Verification scope

Indexed from current sources. Runtime, combination and platform checks have not been completed for every entry.

sdk/rust/src/lib.rs:16

Report an issue with this entry →
Browse this reference type →