Struct otter_api_tests::Instance[][src]

pub struct Instance {
    pub name: Arc<InstanceName>,
    pub gs: GameState,
    pub ipieces: IPieces,
    pub pcaliases: PieceAliases,
    pub ioccults: IOccults,
    pub clients: DenseSlotMap<ClientId, Client>,
    pub iplayers: SecondaryMap<PlayerId, PlayerRecord>,
    pub tokens_players: TokenRegistry<PlayerId>,
    pub tokens_clients: TokenRegistry<ClientId>,
    pub acl: LoadedAcl<TablePermission>,
    pub links: Arc<LinksTable>,
}

Fields

name: Arc<InstanceName>gs: GameStateipieces: IPiecespcaliases: PieceAliasesioccults: IOccultsclients: DenseSlotMap<ClientId, Client>iplayers: SecondaryMap<PlayerId, PlayerRecord>tokens_players: TokenRegistry<PlayerId>tokens_clients: TokenRegistry<ClientId>acl: LoadedAcl<TablePermission>links: Arc<LinksTable>

Implementations

impl Instance[src]

pub fn new(
    name: InstanceName,
    gs: GameState,
    games: &mut RwLockWriteGuard<'static, RawRwLock, HashMap<Arc<InstanceName>, InstanceRef, RandomState>>,
    acl: LoadedAcl<TablePermission>,
    Authorisation<InstanceName>
) -> Result<InstanceRef, MgmtError>
[src]

Returns None if a game with this name already exists

pub fn lookup_by_name_locked_unauth(
    games_table: &HashMap<Arc<InstanceName>, InstanceRef, RandomState>,
    name: &InstanceName
) -> Result<Unauthorised<InstanceRef, InstanceName>, MgmtError>
[src]

pub fn lookup_by_name_locked(
    games: &HashMap<Arc<InstanceName>, InstanceRef, RandomState>,
    name: &InstanceName,
    auth: Authorisation<InstanceName>
) -> Result<InstanceRef, MgmtError>
[src]

pub fn lookup_by_name_unauth(
    name: &InstanceName
) -> Result<Unauthorised<InstanceRef, InstanceName>, MgmtError>
[src]

pub fn lookup_by_name(
    name: &InstanceName,
    auth: Authorisation<InstanceName>
) -> Result<InstanceRef, MgmtError>
[src]

pub fn destroy_game(
    games: &mut RwLockWriteGuard<'static, RawRwLock, HashMap<Arc<InstanceName>, InstanceRef, RandomState>>,
    g: MutexGuard<'_, RawMutex, InstanceContainer>,
    Authorisation<InstanceName>
) -> Result<(), InternalError>
[src]

pub fn list_names(
    account: Option<&AccountName>,
    Authorisation<AccountName>
) -> Vec<Arc<InstanceName>, Global>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[src]

pub fn player_info_pane(&self) -> Result<Html, InternalError>[src]

Trait Implementations

impl Debug for Instance[src]

Auto Trait Implementations

impl !RefUnwindSafe for Instance

impl Send for Instance

impl !Sync for Instance

impl Unpin for Instance

impl !UnwindSafe for Instance

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any

impl<A> DynCastExt for A

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,