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).
Members
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<UploadFileBehaviorBase>
Returns a strong reference to this object.
file_path_property
fn file_path_property() -> &'static StyledProperty<Option<String>>
Identifies the FilePath property.
url_property
fn url_property() -> &'static StyledProperty<Option<String>>
Identifies the Url property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
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.
set_file_path
fn set_file_path(self: &Self, value: Option<String>)
url
fn url(self: &Self) -> Option<String>
Gets or sets the destination URL. This is a property of the object model.
set_url
fn set_url(self: &Self, value: Option<String>)
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherStyledElementBehaviorImplExtDerefUpcast<T>Upcast<UploadFileBehaviorBase>StaticTypeObjectTypeSubclassable<T>StyledElementImplStyledElementBehaviorImplFerroObjectImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.