FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    UploadFileBehaviorBase

    struct · ferroui-xaml-interactions-custom · v0.5.0

    struct UploadFileBehaviorBase
    

    Base class for behaviors that upload a file to a URL.

    The class is abstract: a deriving class calls execute when its event fires.

    Deviation (DEVIATIONS.md, Behaviors): the reference posts the file with HttpClient and runs the command with the response. The framework has no HTTP client service, so the port sends no request: execute checks what the reference checks (enabled, a command, a file path, a URL, an existing file) and then ends as the reference ends when the request fails (the error is ignored and the command does not run).

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<UploadFileBehaviorBase>
    

    Returns a strong reference to this object.

    Source

    file_path_property

    fn file_path_property() -> &'static StyledProperty<Option<String>>
    

    Identifies the FilePath property.

    Source

    url_property

    fn url_property() -> &'static StyledProperty<Option<String>>
    

    Identifies the Url property.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    file_path

    fn file_path(self: &Self) -> Option<String>
    

    Gets or sets the path of the file to upload. This is a property of the object model.

    Source

    set_file_path

    fn set_file_path(self: &Self, value: Option<String>)
    

    Source

    url

    fn url(self: &Self) -> Option<String>
    

    Gets or sets the destination URL. This is a property of the object model.

    Source

    set_url

    fn set_url(self: &Self, value: Option<String>)
    

    Source

    execute

    fn execute(self: &Self, sender: Option<&BoxedValue>, _parameter: Option<&BoxedValue>)
    

    Executes the upload using the provided sender (the control that triggered the behavior) and command parameter.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.