pub fn new(server_name: &str) -> Result<Self, Error> {
        let room_id = format!("!{}:{}", generate_localpart(18), server_name);
        let (opaque_id, host, port) = parse_id('!', &room_id)?;

        Ok(RoomId {
            hostname: host,
            opaque_id: opaque_id.to_string(),
            port: port,
        })
    }
/// Attempts to generate a `RoomId` for the given origin server with a localpart consisting of
/// 18 random ASCII characters.
///
/// Fails if the given origin server name cannot be parsed as a valid host.
Attempts to generate a `RoomId` for the given origin server with a localpart consisting of
18 random ASCII characters.

Fails if the given origin server name cannot be parsed as a valid host.
Attempts to generate a ` RoomId ` for the given origin server with a localpart consisting of 18 random ASCII characters . Fails if the given origin server name cannot be parsed as a valid host .
pub fn new(server_name: &str) -> Result<Self, Error> {
        let room_id = format!("!{}:{}", generate_localpart(18), server_name);
        let (opaque_id, host, port) = parse_id('!', &room_id)?;
        Ok(RoomId {
            hostname: host,
            opaque_id: opaque_id.to_string(),
            port: port,
        })
    }
pub fn new ( server_name : & str ) -> Result < Self , Error > { let room_id = format ! ( " " generate_localpart ( 18 ) server_name ) ; let ( opaque_id , host , port ) = parse_id ( '!' , & room_id ) ? ; Ok ( RoomId { hostname : host , opaque_id : opaque_id . to_string ( ) , port : port , } ) }
Attempts to generate a `RoomId` for the given origin server with a localpart consisting of
18 random ASCII characters.
Attempts to generate a ` RoomId ` for the given origin server with a localpart consisting of 18 random ASCII characters .
server_name
&str