INNER CODE UNIT · Rust
new
librespot-org/librespot · discovery/src/lib.rs:432
pub fn new<T: Into<String>>(device_id: T, client_id: T) -> Self {
Self {
server_config: server::Config {
name: "Librespot".into(),
device_type: DeviceType::default(),
is_group: false,
device_id: device_id.into(),
client_id: client_id.into(),
aliases: Vec::new(),
},
port: 0,
zeroconf_ip: vec![],
zeroconf_backend: None,
}
}
/// Sets the name to be displayed. Default is `"Librespot"`.
pub fn name(mut self, name: impl Into<Cow<'static, str>>) -> Self {