pub struct RobloxStudioOpener { /* private fields */ }Expand description
A builder to open a Roblox Studio instance through the official binary, while also properly handling its CLI arguments and intricacies.
Implementations§
Source§impl RobloxStudioOpener
impl RobloxStudioOpener
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new Roblox Studio opener.
Examples found in repository?
More examples
Sourcepub fn with_server_addr<A>(self, server_addr: A) -> Self
pub fn with_server_addr<A>(self, server_addr: A) -> Self
Sets a custom server address to use with the start_server,
start_server_with_place, or start_client methods.
Defaults to localhost (127.0.0.1).
Sourcepub fn with_server_port(self, server_port: u16) -> Self
pub fn with_server_port(self, server_port: u16) -> Self
Sets a custom server port to use with the start_server,
start_server_with_place, or start_client methods.
Defaults to port 50608.
Sourcepub fn open_place(self, universe_id: u64, place_id: u64) -> Self
pub fn open_place(self, universe_id: u64, place_id: u64) -> Self
Edit an online place in Roblox Studio.
This will open the place with the given universe_id and place_id.
Sourcepub fn open_file<P>(self, file_path: P) -> RobloxStudioResult<Self>
pub fn open_file<P>(self, file_path: P) -> RobloxStudioResult<Self>
Edit a local place file in Roblox Studio.
This will open the place file at the given file_path.
§Errors
- If the given
file_pathcannot be canonicalized. - If the given
file_pathcannot be converted to a string.
Sourcepub fn start_server<P>(self, file_path: P) -> RobloxStudioResult<Self>
pub fn start_server<P>(self, file_path: P) -> RobloxStudioResult<Self>
Start a server in Roblox Studio with the given place file.
This will copy the place file at the given file_path
to the Roblox server file, and then start the server.
§Errors
- If the local data directory cannot be found.
- If the given place file cannot be copied to the local data directory.
Sourcepub fn start_server_with_clients<P>(
self,
file_path: P,
num_clients: u8,
) -> RobloxStudioResult<Self>
pub fn start_server_with_clients<P>( self, file_path: P, num_clients: u8, ) -> RobloxStudioResult<Self>
Start a server in Roblox Studio with the given place file and clients.
This will also automatically start the given number of clients.
See start_server for more information.
Sourcepub fn start_client(self) -> Self
pub fn start_client(self) -> Self
Starts a single client, connecting to an already launched server.
See start_server for more information.
Sourcepub fn run(self) -> RobloxStudioResult<()>
pub fn run(self) -> RobloxStudioResult<()>
Starts Roblox Studio with all of the given arguments.
Note that this will not wait for Roblox Studio to actually open the file/server/client - it only guarantees that the process has been spawned and that it has received the necessary arguments.
§Errors
- If the Roblox Studio executable cannot be found.
Examples found in repository?
More examples
Trait Implementations§
Source§impl Clone for RobloxStudioOpener
impl Clone for RobloxStudioOpener
Source§fn clone(&self) -> RobloxStudioOpener
fn clone(&self) -> RobloxStudioOpener
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more