pub enum DescriptorValue {
Show 15 variants
Reference(Vec<ReferenceItem>),
Descriptor(Descriptor),
List(Vec<DescriptorValue>),
Double(f64),
UnitDouble(UnitDoubleValue),
Text(String),
Enum(String),
Integer(i32),
LargeInteger(LargeInteger),
Boolean(bool),
Class(ClassStructure),
Alias(String),
RawData(Vec<u8>),
ObjectArray(Vec<ObjectArrayItem>),
Path(PathValue),
}Expand description
Значение OSType-поля дескриптора (динамическое типизированное дерево).
Variants§
Reference(Vec<ReferenceItem>)
’obj ’ — Reference.
Descriptor(Descriptor)
‘Objc’ / ‘GlbO’ — вложенный дескриптор.
List(Vec<DescriptorValue>)
‘VlLs’ — список.
Double(f64)
‘doub’ — double.
UnitDouble(UnitDoubleValue)
‘UntF’ (float64) / ‘UnFl’ (float32) — unit double.
Text(String)
‘TEXT’ — unicode string.
Enum(String)
‘enum’ — "type.value".
Integer(i32)
‘long’ — int32.
LargeInteger(LargeInteger)
‘comp’ — large integer.
Boolean(bool)
‘bool’.
Class(ClassStructure)
‘type’ / ‘GlbC’ — class.
Alias(String)
‘alis’ — alias (ASCII string).
RawData(Vec<u8>)
‘tdta’ — raw data.
ObjectArray(Vec<ObjectArrayItem>)
‘ObAr’ — object array.
Path(PathValue)
’Pth ’ — file path / alias.
Implementations§
Source§impl DescriptorValue
impl DescriptorValue
Sourcepub fn os_type(&self) -> &'static str
pub fn os_type(&self) -> &'static str
4-байтовый код OSType для данного варианта значения.
UnFl неотличим от UntF по значению — оба несут UnitDoubleValue;
мы выбираем ‘UntF’ по умолчанию (как и большинство полей PSD).
На записи это управляется явным write_os_type (см. float32-вариант ниже).
Trait Implementations§
Source§impl Clone for DescriptorValue
impl Clone for DescriptorValue
Source§fn clone(&self) -> DescriptorValue
fn clone(&self) -> DescriptorValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DescriptorValue
impl Debug for DescriptorValue
Source§impl PartialEq for DescriptorValue
impl PartialEq for DescriptorValue
Source§fn eq(&self, other: &DescriptorValue) -> bool
fn eq(&self, other: &DescriptorValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DescriptorValue
Auto Trait Implementations§
impl Freeze for DescriptorValue
impl RefUnwindSafe for DescriptorValue
impl Send for DescriptorValue
impl Sync for DescriptorValue
impl Unpin for DescriptorValue
impl UnsafeUnpin for DescriptorValue
impl UnwindSafe for DescriptorValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more