Struct librespot_protocol::metadata::Restriction
source · [−]pub struct Restriction {
pub catalogue: Vec<Restriction_Catalogue>,
pub catalogue_str: RepeatedField<String>,
pub unknown_fields: UnknownFields,
pub cached_size: CachedSize,
/* private fields */
}
Fields
catalogue: Vec<Restriction_Catalogue>
catalogue_str: RepeatedField<String>
unknown_fields: UnknownFields
cached_size: CachedSize
Implementations
sourceimpl Restriction
impl Restriction
pub fn new() -> Restriction
pub fn get_catalogue(&self) -> &[Restriction_Catalogue]
pub fn clear_catalogue(&mut self)
pub fn set_catalogue(&mut self, v: Vec<Restriction_Catalogue>)
pub fn mut_catalogue(&mut self) -> &mut Vec<Restriction_Catalogue>
pub fn take_catalogue(&mut self) -> Vec<Restriction_Catalogue>
pub fn get_countries_allowed(&self) -> &str
pub fn clear_countries_allowed(&mut self)
pub fn has_countries_allowed(&self) -> bool
pub fn set_countries_allowed(&mut self, v: String)
pub fn mut_countries_allowed(&mut self) -> &mut String
pub fn take_countries_allowed(&mut self) -> String
pub fn get_countries_forbidden(&self) -> &str
pub fn clear_countries_forbidden(&mut self)
pub fn has_countries_forbidden(&self) -> bool
pub fn set_countries_forbidden(&mut self, v: String)
pub fn mut_countries_forbidden(&mut self) -> &mut String
pub fn take_countries_forbidden(&mut self) -> String
pub fn get_typ(&self) -> Restriction_Type
pub fn clear_typ(&mut self)
pub fn has_typ(&self) -> bool
pub fn set_typ(&mut self, v: Restriction_Type)
pub fn get_catalogue_str(&self) -> &[String]
pub fn clear_catalogue_str(&mut self)
pub fn set_catalogue_str(&mut self, v: RepeatedField<String>)
pub fn mut_catalogue_str(&mut self) -> &mut RepeatedField<String>
pub fn take_catalogue_str(&mut self) -> RepeatedField<String>
Trait Implementations
sourceimpl Clear for Restriction
impl Clear for Restriction
sourceimpl Clone for Restriction
impl Clone for Restriction
sourcefn clone(&self) -> Restriction
fn clone(&self) -> Restriction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Restriction
impl Debug for Restriction
sourceimpl<'a> Default for &'a Restriction
impl<'a> Default for &'a Restriction
sourcefn default() -> &'a Restriction
fn default() -> &'a Restriction
Returns the “default value” for a type. Read more
sourceimpl Default for Restriction
impl Default for Restriction
sourcefn default() -> Restriction
fn default() -> Restriction
Returns the “default value” for a type. Read more
sourceimpl Message for Restriction
impl Message for Restriction
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 new() -> Restriction
fn new() -> Restriction
Create an empty message object. Read more
sourcefn descriptor_static() -> &'static MessageDescriptor
fn descriptor_static() -> &'static MessageDescriptor
Get message descriptor for message type. Read more
sourcefn default_instance() -> &'static Restriction
fn default_instance() -> &'static Restriction
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 PartialEq<Restriction> for Restriction
impl PartialEq<Restriction> for Restriction
sourcefn eq(&self, other: &Restriction) -> bool
fn eq(&self, other: &Restriction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Restriction) -> bool
fn ne(&self, other: &Restriction) -> bool
This method tests for !=
.
sourceimpl ProtobufValue for Restriction
impl ProtobufValue for Restriction
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 Restriction
Auto Trait Implementations
impl RefUnwindSafe for Restriction
impl Send for Restriction
impl Sync for Restriction
impl Unpin for Restriction
impl UnwindSafe for Restriction
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