Struct flattiverse_connector::Connector
source · pub struct Connector { /* private fields */ }
Implementations
sourceimpl Connector
impl Connector
pub fn new(
email: &str,
password: &str,
compression_enabled: bool,
benchmark: Option<PerformanceMark>
) -> Result<Arc<Connector>, Error>
pub fn send(&self, packet: &Packet) -> Result<(), Error>
pub fn send_many(&self, packets: &[Packet]) -> Result<(), Error>
pub fn players(&self) -> RwLockReadGuard<'_, UniversalHolder<Player>>
pub fn player(&self) -> Weak<Player>
pub fn player_for(&self, index: u16) -> Result<Arc<Player>, Error>
pub fn weak_player_for(&self, index: u16) -> Result<Weak<Player>, Error>
pub fn block_manager(&self) -> &BlockManager
pub fn register_task_quitely_if_unknown(&self, task: Task)
pub fn register_task_if_unknown(&self, task: Task) -> Result<(), Error>
pub fn register_task(&self, task: Task) -> Result<(), Error>
pub fn unregister_flow_control(
&self,
flow: &Arc<UniverseGroupFlowControl>
) -> Result<bool, Error>
pub fn flow_controls(&self) -> Result<bool, Error>
sourcepub fn flow_control_check(&self, tick: u16) -> Result<bool, Error>
pub fn flow_control_check(&self, tick: u16) -> Result<bool, Error>
Whether the commit was successful
pub fn universe_groups(&self) -> &RwLock<ManagedArray<Arc<UniverseGroup>>>
pub fn universe_group(&self, index: u16) -> Result<Arc<UniverseGroup>, Error>
pub fn universe_group_for_name(
&self,
name: &str
) -> Result<Arc<UniverseGroup>, Error>
pub fn crystals(&self, name: &str) -> Result<Arc<CrystalCargoItem>, Error>
pub fn controllable(&self, index: u8) -> Result<AnyControllable, Error>
pub fn controllable_opt(&self, index: u8) -> Option<AnyControllable>
sourcepub fn query_designes(&self) -> Result<Vec<ControllableDesign>, Error>
pub fn query_designes(&self) -> Result<Vec<ControllableDesign>, Error>
Queries up to 128 designs.
You can edit these ControllableDesigns via the flattiverse.com homepage
Beware: The flattiverse-server will queue your and the requsts of other players to avoid high loads on the database. So this method might need some time in until it returns. Parallel requests to this method will be declined by the flattiverse-server resultin in an empty return Vec. You have been warned.
pub fn next_message(&self) -> Option<AnyMessage>
pub fn has_flows(&self) -> Result<bool, Error>
pub fn close(&self) -> Result<(), Error>
pub fn check_name(name: &str) -> bool
pub fn benchmark() -> Result<PerformanceMark, Error>
pub fn hostname() -> String
Auto Trait Implementations
impl !RefUnwindSafe for Connector
impl Send for Connector
impl Sync for Connector
impl Unpin for Connector
impl UnwindSafe for Connector
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more