pub struct ServerInterface<'a> { /* private fields */ }Expand description
A safe wrapper around Adobe’s ExtendScript server interface.
This struct provides a safe and idiomatic Rust interface to the underlying C API, handling memory management, type conversions, and error handling automatically.
Implementations§
Source§impl<'a> ServerInterface<'a>
impl<'a> ServerInterface<'a>
Sourcepub fn new(interface: &'a SoServerInterface, server: SoHServer) -> Self
pub fn new(interface: &'a SoServerInterface, server: SoHServer) -> Self
Creates a new ServerInterface instance.
§Arguments
interface- Reference to the SoServerInterface function tableserver- Server handle for object management
Sourcepub fn raw_interface(&self) -> *const SoServerInterface
pub fn raw_interface(&self) -> *const SoServerInterface
Get the raw interface pointer
Sourcepub fn dump_object(&self, h_object: SoHObject) -> c_long
pub fn dump_object(&self, h_object: SoHObject) -> c_long
Sourcepub fn dump_server(&self) -> c_long
pub fn dump_server(&self) -> c_long
Dumps the current state of the server for debugging purposes.
§Returns
ESerror_t- Error code indicating success or failure
Sourcepub fn get_live_object(
&self,
h_object: SoHObject,
name: &str,
) -> Result<TaggedData, c_long>
pub fn get_live_object( &self, h_object: SoHObject, name: &str, ) -> Result<TaggedData, c_long>
pub fn get_live_object_from_raw_address( &self, h_object: SoHObject, address: *mut c_void, ) -> Result<TaggedData, c_long>
Sourcepub fn put_live_object(
&self,
h_object: SoHObject,
name: &str,
value: &TaggedData,
) -> c_long
pub fn put_live_object( &self, h_object: SoHObject, name: &str, value: &TaggedData, ) -> c_long
Sourcepub fn call_live_object(
&self,
h_object: SoHObject,
method: &str,
args: &[TaggedData],
) -> Result<TaggedData, c_long>
pub fn call_live_object( &self, h_object: SoHObject, method: &str, args: &[TaggedData], ) -> Result<TaggedData, c_long>
Sourcepub fn tagged_data_init(&self) -> Result<TaggedData, c_long>
pub fn tagged_data_init(&self) -> Result<TaggedData, c_long>
Initializes a new TaggedData instance.
§Returns
Result<TaggedData, ESerror_t>- The initialized TaggedData or error code
Sourcepub fn tagged_data_free(&self, data: &mut TaggedData)
pub fn tagged_data_free(&self, data: &mut TaggedData)
Sourcepub fn add_class(
&self,
name: &str,
object_interface: &mut SoObjectInterface,
) -> c_long
pub fn add_class( &self, name: &str, object_interface: &mut SoObjectInterface, ) -> c_long
Sourcepub fn add_methods(
&self,
h_object: SoHObject,
names: &mut [SoCClientName],
) -> c_long
pub fn add_methods( &self, h_object: SoHObject, names: &mut [SoCClientName], ) -> c_long
Sourcepub fn add_properties(
&self,
h_object: SoHObject,
names: &mut [SoCClientName],
) -> c_long
pub fn add_properties( &self, h_object: SoHObject, names: &mut [SoCClientName], ) -> c_long
Sourcepub fn get_server(
&self,
h_object: SoHObject,
) -> Result<(SoHServer, &'a SoServerInterface), c_long>
pub fn get_server( &self, h_object: SoHObject, ) -> Result<(SoHServer, &'a SoServerInterface), c_long>
Trait Implementations§
Source§impl<'a> Clone for ServerInterface<'a>
impl<'a> Clone for ServerInterface<'a>
Source§fn clone(&self) -> ServerInterface<'a>
fn clone(&self) -> ServerInterface<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for ServerInterface<'a>
Auto Trait Implementations§
impl<'a> Freeze for ServerInterface<'a>
impl<'a> RefUnwindSafe for ServerInterface<'a>
impl<'a> !Send for ServerInterface<'a>
impl<'a> !Sync for ServerInterface<'a>
impl<'a> Unpin for ServerInterface<'a>
impl<'a> UnsafeUnpin for ServerInterface<'a>
impl<'a> UnwindSafe for ServerInterface<'a>
Blanket Implementations§
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