Struct librespot_protocol::metadata::Track
source · [−]pub struct Track {
pub album: SingularPtrField<Album>,
pub artist: RepeatedField<Artist>,
pub external_id: RepeatedField<ExternalId>,
pub restriction: RepeatedField<Restriction>,
pub file: RepeatedField<AudioFile>,
pub alternative: RepeatedField<Track>,
pub sale_period: RepeatedField<SalePeriod>,
pub preview: RepeatedField<AudioFile>,
pub unknown_fields: UnknownFields,
pub cached_size: CachedSize,
/* private fields */
}
Fields
album: SingularPtrField<Album>
artist: RepeatedField<Artist>
external_id: RepeatedField<ExternalId>
restriction: RepeatedField<Restriction>
file: RepeatedField<AudioFile>
alternative: RepeatedField<Track>
sale_period: RepeatedField<SalePeriod>
preview: RepeatedField<AudioFile>
unknown_fields: UnknownFields
cached_size: CachedSize
Implementations
sourceimpl Track
impl Track
pub fn new() -> Track
pub fn get_gid(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn clear_gid(&mut self)
pub fn has_gid(&self) -> bool
pub fn set_gid(&mut self, v: Vec<u8>)
pub fn mut_gid(&mut self) -> &mut Vec<u8>
pub fn take_gid(&mut self) -> Vec<u8>
pub fn get_name(&self) -> &str
pub fn clear_name(&mut self)
pub fn has_name(&self) -> bool
pub fn set_name(&mut self, v: String)
pub fn mut_name(&mut self) -> &mut String
pub fn take_name(&mut self) -> String
pub fn get_album(&self) -> &Album
pub fn clear_album(&mut self)
pub fn has_album(&self) -> bool
pub fn set_album(&mut self, v: Album)
pub fn mut_album(&mut self) -> &mut Album
pub fn take_album(&mut self) -> Album
pub fn get_artist(&self) -> &[Artist]
pub fn clear_artist(&mut self)
pub fn set_artist(&mut self, v: RepeatedField<Artist>)
pub fn mut_artist(&mut self) -> &mut RepeatedField<Artist>
pub fn take_artist(&mut self) -> RepeatedField<Artist>
pub fn get_number(&self) -> i32
pub fn clear_number(&mut self)
pub fn has_number(&self) -> bool
pub fn set_number(&mut self, v: i32)
pub fn get_disc_number(&self) -> i32
pub fn clear_disc_number(&mut self)
pub fn has_disc_number(&self) -> bool
pub fn set_disc_number(&mut self, v: i32)
pub fn get_duration(&self) -> i32
pub fn clear_duration(&mut self)
pub fn has_duration(&self) -> bool
pub fn set_duration(&mut self, v: i32)
pub fn get_popularity(&self) -> i32
pub fn clear_popularity(&mut self)
pub fn has_popularity(&self) -> bool
pub fn set_popularity(&mut self, v: i32)
pub fn get_explicit(&self) -> bool
pub fn clear_explicit(&mut self)
pub fn has_explicit(&self) -> bool
pub fn set_explicit(&mut self, v: bool)
pub fn get_external_id(&self) -> &[ExternalId]
pub fn clear_external_id(&mut self)
pub fn set_external_id(&mut self, v: RepeatedField<ExternalId>)
pub fn mut_external_id(&mut self) -> &mut RepeatedField<ExternalId>
pub fn take_external_id(&mut self) -> RepeatedField<ExternalId>
pub fn get_restriction(&self) -> &[Restriction]
pub fn clear_restriction(&mut self)
pub fn set_restriction(&mut self, v: RepeatedField<Restriction>)
pub fn mut_restriction(&mut self) -> &mut RepeatedField<Restriction>
pub fn take_restriction(&mut self) -> RepeatedField<Restriction>
pub fn get_file(&self) -> &[AudioFile]
pub fn clear_file(&mut self)
pub fn set_file(&mut self, v: RepeatedField<AudioFile>)
pub fn mut_file(&mut self) -> &mut RepeatedField<AudioFile>
pub fn take_file(&mut self) -> RepeatedField<AudioFile>
pub fn get_alternative(&self) -> &[Track]
pub fn clear_alternative(&mut self)
pub fn set_alternative(&mut self, v: RepeatedField<Track>)
pub fn mut_alternative(&mut self) -> &mut RepeatedField<Track>
pub fn take_alternative(&mut self) -> RepeatedField<Track>
pub fn get_sale_period(&self) -> &[SalePeriod]
pub fn clear_sale_period(&mut self)
pub fn set_sale_period(&mut self, v: RepeatedField<SalePeriod>)
pub fn mut_sale_period(&mut self) -> &mut RepeatedField<SalePeriod>
pub fn take_sale_period(&mut self) -> RepeatedField<SalePeriod>
pub fn get_preview(&self) -> &[AudioFile]
pub fn clear_preview(&mut self)
pub fn set_preview(&mut self, v: RepeatedField<AudioFile>)
pub fn mut_preview(&mut self) -> &mut RepeatedField<AudioFile>
pub fn take_preview(&mut self) -> RepeatedField<AudioFile>
Trait Implementations
sourceimpl Message for Track
impl Message for Track
sourcefn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
True iff all required fields are initialized.
Always returns true
for protobuf 3. Read more
sourcefn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> ProtobufResult<()>
fn merge_from(&mut self, is: &mut CodedInputStream<'_>) -> ProtobufResult<()>
Update this message object with fields read from given stream.
sourcefn compute_size(&self) -> u32
fn compute_size(&self) -> u32
Compute and cache size of this message and all nested messages
sourcefn write_to_with_cached_sizes(
&self,
os: &mut CodedOutputStream<'_>
) -> ProtobufResult<()>
fn write_to_with_cached_sizes(
&self,
os: &mut CodedOutputStream<'_>
) -> ProtobufResult<()>
Write message to the stream. Read more
sourcefn get_cached_size(&self) -> u32
fn get_cached_size(&self) -> u32
Get size previously computed by compute_size
.
sourcefn get_unknown_fields(&self) -> &UnknownFields
fn get_unknown_fields(&self) -> &UnknownFields
Get a reference to unknown fields.
sourcefn mut_unknown_fields(&mut self) -> &mut UnknownFields
fn mut_unknown_fields(&mut self) -> &mut UnknownFields
Get a mutable reference to unknown fields.
sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
View self as mutable Any
.
sourcefn descriptor(&self) -> &'static MessageDescriptor
fn descriptor(&self) -> &'static MessageDescriptor
Message descriptor for this message, used for reflection.
sourcefn descriptor_static() -> &'static MessageDescriptor
fn descriptor_static() -> &'static MessageDescriptor
Get message descriptor for message type. Read more
sourcefn default_instance() -> &'static Track
fn default_instance() -> &'static Track
Return a pointer to default immutable message with static lifetime. Read more
sourcefn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, ProtobufError>
fn parse_from(is: &mut CodedInputStream<'_>) -> Result<Self, ProtobufError>
Parse message from stream.
sourcefn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), ProtobufError>
fn write_to(&self, os: &mut CodedOutputStream<'_>) -> Result<(), ProtobufError>
Write the message to the stream. Read more
sourcefn write_length_delimited_to(
&self,
os: &mut CodedOutputStream<'_>
) -> Result<(), ProtobufError>
fn write_length_delimited_to(
&self,
os: &mut CodedOutputStream<'_>
) -> Result<(), ProtobufError>
Write the message to the stream prepending the message with message length encoded as varint. Read more
sourcefn write_length_delimited_to_vec(
&self,
vec: &mut Vec<u8, Global>
) -> Result<(), ProtobufError>
fn write_length_delimited_to_vec(
&self,
vec: &mut Vec<u8, Global>
) -> Result<(), ProtobufError>
Write the message to the vec, prepend the message with message length encoded as varint. Read more
sourcefn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>
fn merge_from_bytes(&mut self, bytes: &[u8]) -> Result<(), ProtobufError>
Update this message object with fields read from given stream.
sourcefn parse_from_reader(reader: &mut dyn Read) -> Result<Self, ProtobufError>
fn parse_from_reader(reader: &mut dyn Read) -> Result<Self, ProtobufError>
Parse message from reader. Parse stops on EOF or when error encountered. Read more
sourcefn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>
fn parse_from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>
Parse message from byte array.
sourcefn check_initialized(&self) -> Result<(), ProtobufError>
fn check_initialized(&self) -> Result<(), ProtobufError>
Check if all required fields of this object are initialized.
sourcefn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>
fn write_to_writer(&self, w: &mut dyn Write) -> Result<(), ProtobufError>
Write the message to the writer.
sourcefn write_to_vec(&self, v: &mut Vec<u8, Global>) -> Result<(), ProtobufError>
fn write_to_vec(&self, v: &mut Vec<u8, Global>) -> Result<(), ProtobufError>
Write the message to bytes vec.
sourcefn write_to_bytes(&self) -> Result<Vec<u8, Global>, ProtobufError>
fn write_to_bytes(&self) -> Result<Vec<u8, Global>, ProtobufError>
Write the message to bytes vec.
sourcefn write_length_delimited_to_writer(
&self,
w: &mut dyn Write
) -> Result<(), ProtobufError>
fn write_length_delimited_to_writer(
&self,
w: &mut dyn Write
) -> Result<(), ProtobufError>
Write the message to the writer, prepend the message with message length encoded as varint. Read more
sourcefn write_length_delimited_to_bytes(
&self
) -> Result<Vec<u8, Global>, ProtobufError>
fn write_length_delimited_to_bytes(
&self
) -> Result<Vec<u8, Global>, ProtobufError>
Write the message to the bytes vec, prepend the message with message length encoded as varint. Read more
sourceimpl ProtobufValue for Track
impl ProtobufValue for Track
sourcefn as_ref(&self) -> ReflectValueRef<'_>
fn as_ref(&self) -> ReflectValueRef<'_>
As ref
sourcefn is_non_zero(&self) -> bool
fn is_non_zero(&self) -> bool
Is value non-zero?
sourcefn as_ref_copy(&self) -> ReflectValueRef<'static>
fn as_ref_copy(&self) -> ReflectValueRef<'static>
Return ProtobufValueRef
if self is Copy
. Read more
impl StructuralPartialEq for Track
Auto Trait Implementations
impl RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin for Track
impl UnwindSafe for Track
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more