fn deref(&self) -> &[u16] { let len = ifself.0.is_null() { 0
} else { unsafe { SysStringLen(self.0) as usize }
};
if len > 0 { unsafe { core::slice::from_raw_parts(self.0, len) }
} else { // This ensures that if `as_ptr` is called on the slice that the resulting pointer // will still refer to a null-terminated string. const EMPTY: [u16; 1] = [0];
&EMPTY[..0]
}
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.